TL;DR Autoptimize 2.4 will be a major change. Tomaš Trkulja (aka zytzagoo) has cleaned up and modernized the code significantly, making it easier to read and maintain, switched to the latest and greatest minifiers and added automated testing. And as if that isn’t enough we’re also adding new optimization options! The downside: we will be dropping support for PHP < 5.3 and for the “legacy minifiers”. AO 2.4 will first be made available as a separate “Autoptimize Beta” plugin
on wordpress.org via GitHub and will see more releases/ iterations with new options/ optimizations there before being promoted to the official “Autoptimize”.
Back in March 2015 zytzagoo forked Autoptimize, rewriting the CDN-replacement logic (and a lot of autoptimizeStyles::minify really) and started adding automated testing. I kept an eye on the fork and later that year I contacted Tomas via Github to see how we could collaborate. We have been in touch ever since; some of his improvements have already been integrated and he is my go-to man to discuss coding best practices, bugfixes and security.
FFWD to the nearby future; Autoptimize 2.4 will be based on Tomaš’ fork and will include the following major changes:
- New: option only minify JS/ CSS without combining them
- New: excluded JS- or CSS-files will be automatically minified
- Improvement: switching to the current version of JSMin and -more importantly- of YUI CSS compressor PHP port which has some major performance-improvements of itself
- Improvement: all create_function() instances have been replaced by anonymous functions (PHP 7.2 started issuing warnings about create_function being deprecated)
- Improvement: all code in autoptimize/classlesses/* (my stuff) has been rewritten into OOP and is now in autoptimize/classes/*
- Improvement: use of autoload instead of manual conditional includes
- Improvement: a nice amount of test cases (although no 100% coverage yet), allowing for Travis continuous integration-tests being done
- dropping support for PHP below 5.3 (you really should be on PHP 7.x, it is way faster)
- dropping support for the legacy minifiers
These improvements will be released in a separate “Autoptimize Beta” plugin soon (albeit not on wordpress.org as “beta”-plugins are not allowed). You can already download from GitHub here. We will start adding additional optimization options there, releasing at a higher pace. The goal is to create a healthy Beta-user pool allowing us to move code from AO Beta to AO proper with more confidence. So what new optimization options would you like to see added to Autoptimize 2.4 and beyond? :-)
[corrected 19/02; wordpress.org does not allow beta-plugins]
I just released Autoptimize 2.3.0, the Happy New Year release. As described here earlier it has some significant extra optimizations to help you improve your site’s performance even more for 2018:
- new: optimize Google fonts with “combine & link” and “combine and load async” (with webload.js), intelligently preconnecting to Google’s domains to limit performance impact even further
- new: Async JS, can be applied to local or 3rd party JS (if local it will be auto-excluded from autoptimization)
- new: support to tell browsers to preconnect (= dns lookup + tcp/ip connection + ssl negotiation) to 3rd party domains (depends on browser support, works in Chrome & Firefox)
- new: remove WordPress’ Core’s emoji CSS & JS
- new: remove (version parameter from) Querystring
- new: support to clear cache through WP CLI thanks to junaidbhura
- lots of bugfixes and small improvements done by some seriously smart people via GitHub (thanks all!!), including a fix for AO 2.2 which saw the HTML minifier go PacMan on spaces in some circumstances.
So just before I will unleash Autoptimize 2.3 on the world, the “active installations” ticker went from 400K to 500K;
What a nice gift from you all of you, thanks!
(the “Last updated: 19 hours ago” is due to an update of the tags in the readme.txt, 2.3 is not out yet)
With the last release almost 6 months in the past, it’s high time for a new Autoptimize release. And what a release that will be my friends!
Here are the most important features/ improvements (most new options are on a separate tab, “Extra” to keep things organized as seen in the screenshot);
- Google fonts; remove (not new), but also “combine & link” and “combine and load async” (with webload.js), intelligently preconnecting to Google’s domains to limit performance impact even further
- Async JS, can be applied to local or 3rd party JS (if local it will be auto-excluded from autoptimization)
- support to tell browsers to preconnect (= dns lookup + tcp/ip connection + ssl negotiation) to 3rd party domains (depends on browser support, works in Chrome & Firefox)
- remove WordPress’ Core’s emoji CSS & JS
- remove (version parameter from) Querystring
- support to clear cache through WP CLI
- a significant amount of bugfixes done by some seriously smart people via GitHub (thanks all!!), including a fix for the main bug in AO 2.2.x which saw the HTML minifier go PacMan on spaces in some circumstances
If you want to test AO 2.3, you can download the zipfile from GitHub here. I would love your feedback!
Happy end-of-year to all, who knows we can wrap up AO 2.3 nicely, ribbon and all, for New Years? :-)
I just committed what I consider the last feature to be added to AO Extra; the optimization of Google Fonts, with the choice between:
- “aggregate and link”, where the Google Font CSS might still render-blocking but there will be no “flash of unstyled fonts”)
- “aggregate and load asynchronous with webfont.js” will not be render-blocking, but might lead to that dreaded “flash of unstyled fonts”
Next step before merging AO Extra with Autoptimize to become AO 2.3; testing. And that’s where I need your help;
- Download the AO Extra zip-file from Github
- go to Plugins -> Add New -> Upload Plugin
- Click “browse” and select the zip-file you downloaded in (1)
- Click “Install now”
- Click “Activate”
- Go to Settings -> Autoptimize -> Extra
- Give generic feedback below or file bugs in the projects Github Issues
If all goes well Autoptimize 2.3 could be release before we have to wave 2017 goodbye :-)
So with that nice little page cache experiment concluded, I started working on something that will definitively be included in the next version of Autoptimize; Extra Auto-optimizations!
You can read all about it below or you can skip all of that and immediately download the zipfile of the “AO Extra power-up” from the Github repository.
The 3 features available now;
- remove Emoji’s
- remove (version parameter from the) query string (not that big a deal, from a load time perspective, but still)
- the ability to have Autoptimize add the
There’s one extra feature that will very likely be added; optimize Google Fonts (because removing them is considered harsh, apparently).
Do download, do test and do let me know if anything is broken in the comments or via my contact form. And If you have other ideas for extra features, do let me know too!
So I integrated a page cache (based on KeyCDN Cache Enabler) in Autoptimize, just to see how easy (or difficult) it would be. Turns out it was pretty easy, mostly because Cache Enabler (based on Cachify, which was very popular in Germany until the developer abandoned Cachify) is well-written, simple and efficient. :-)
No plans to release this though. Or do you think I should?