Autoptimize 2.9 release: Tuesday 27th?

Quick public service announcement; Autoptimize 2.9 is almost ready to be released but given the planned release of WordPress 5.8 (July 20th) and the risk of support requests mixing up WordPress core update related issues with the Autoptimize update related issues, Autoptimize 2.9 will probably be released one week after WordPress 5.8, so on or around Tuesday 27th.
If you’re eager to use 2.9 (with better image optimization, improved JS optimization and per page/ post Autoptimize settings) you can off course download the beta here immediately.

How to make Autoptimize (even) faster

Less blogposts here lately, mostly because I’m doing custom Autoptimize-development for a partner (more on that later) and because I get a lot of support-questions on the wordpress.org support forums (with approx. between 1500-2000 downloads/ weekday that is to be expected). One of the more interesting questions I got there was about Autoptimize being slow when JS optimization was active and what would be the cause of that. The reply is of interest for a larger audience and is equally valid for CSS optimization;

Typically the majority of time spent in Autoptimize is mainly in the actual minification of code that is not minified yet (purely based on filename; if the filename ends in .min.js or -min.js).
So generally speaking, the way to avoid this is;
1. have a page cache to avoid requests triggering autoptimize (as in that case the cached HTML will have links to cached CSS/JS in it)
2. for uncached pages; make sure AO can re-use previously cached CSS/ JS (from another page), in which case no minification needs to be done (for that you will almost always want to NOT aggregate inline JS, as this almost always busts the cache)
3. for uncached CSS/ JS; make sure any minified file is recognizable as such in the filename (e.g. .min.css -min.js), this can lighten the minification-load considerably (I’ll add a filter in the next version of AO so you can tell AO a file is minified even if it does not have that in the name).
So based on this, some tips;
* make sure you’re not aggregating inline JS
* for your own code (CSS/ JS); make sure it is minified and that the filename confirms this. if you can convince the theme’s developer to do so, all the better (esp. the already minified but big wp-content/themes/bridge/js/plugins.js is a waste of precious resources)
* you could try switching to the legacy minifiers (see FAQ) to see if this improves performance
* you can also check if excluding some un-minified files from minification helps performance (e.g. that bridge/js/plugins.js)

Reviewing bad reviews when in a bad mood

So now and again people try out Autoptimize in a … clueless manner, see things breaking, deactivating it immediately (no problem up to that point) and posting a bad review. In general I will patiently reply that they can fix almost any issue themselves using the settings-screen and that there’s info in the FAQ and I’ll even troubleshoot for them if they’re kind of nice. This gentle and helpful approach has, in the past, already resulted in updated, raving reviews and can only be highly recommended.
But sometimes I’m just in a bad mood, and I post an rant like this one;

Zoukspot
★☆☆☆☆ You’re doing it wrong
If I could review your review, the title would be “you’re doing it wrong”. Because, you are indeed doing it wrong @zoukspot, on multiple levels.
First and foremost; optimizing JavaScript can be tricky and it is not uncommon to have to adjust AO (or any JS-optimizer) configuration to fix things. So if you have a problem in your context (beaverbuilder) and you don’t configure AO to fix that problem but simply deactivate AO instead, then you’re doing it wrong.
But your doing it wrong on another level as well;
1. If something (say a plugin) doesn’t work, you’re supposed to look at the controls (in this case, the settings page) to see if you can fix it there (spoiler: I’m 100% this is fixable without having to deactivate AO entirely).
2. If you can’t find your way around those controls (the settings-page) you’re supposed to look in the manual (in this case; the FAQ). RTFM, as they used to say in the days of yore.
3. If the manual (that great FAQ) doesn’t help you fix your stuff, you could ask customer service (in this case; the forum) for assistance. I tend to “hang out” there quite often and am very responsive.
If you’ve gone through these steps and you still can’t get your something (a plugin) working and you feel you haven’t received the support you think you’re entitled to, then (and as far as I’m concerned, only then, but I might be biased) you can post a negative review about how bad that piece of junk broke your site.
Now I can’t know for sure if you had a look at the settings page or the FAQ (although I would very much doubt that), but I know for a fact that you haven’t sought help for your problem. So why, might I ask, are you posting a 3-star review if you clearly did no effort to look for a solution for your problem yourself?
Based on all of this, I can only rate your review with 1 star. I will gladly reconsider my review, if you reconsider yours.
(sorry, bad day at the office and kind of frustrated about pointless reviews like these. you’re not the first, you won’t be the last, but you happened to be in the wrong place at the wrong time. no hard feelings. well, not a lot of them anyway 😉 )

But all will be better tomorrow and I’ll be patient and helpful once again, I promise!