Introducing zytzagoo’s major changes for Autoptimize 2.4

[UPDATE 29/03/2018: Autoptimize 2.4 can now be downloaded from and will automatically update so ensure all new functionality and fixes are applied]
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 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 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; does not allow beta-plugins]

25 thoughts on “Introducing zytzagoo’s major changes for Autoptimize 2.4”

  1. It may beyond the scope of the plugin, but I would love a way to test the page load time after making a change, so that I can easily see what effect of the changes I was trying out.

  2. Thank you for your nice work and share !
    And here is a feature request … Is it possible to add an area to every post with an option to manualy put critical css ?:D with condition if there is a critical css on page/post then don’t pull global critical css πŸ™‚
    With best regards!

      • Hi dear,
        In that people list, I am one πŸ˜›
        I am going to test this plugin without any further delay.
        Thanks Regards,

  3. ok The Settings didn’t go away if you deactivate or delete this plugin
    Create a Problem with Jquery even it excluded from optimization

    • that’s pretty vague Vibhi, we’ll need more info (or a URL to a site which has that problem) or a step-by-step description of how to reproduce, can you provide that?

  4. I think my comment got in spam This Problem Is in my Live site too It Create this permanent issue with theme And i can’t find The solution of this problem

  5. I did Still Same issue
    Same happens to my site that uses Colormag
    and it happens to me when I first start a site and used clock theme
    And it messed up with slider
    and it never get fixed i have to Reinstall the whole WordPress
    Although It Provides huge performance gain that why i still use it
    but What i can do now to fix it

  6. Hi
    How stable is 2.4 now? Is it save to run at a small production site?
    –> no problem if it’s suboptimal or a bit slower than 2.3 in some cases.

  7. I know of a number of production sites on which it is running already. Changes on Github will only be pushed out as plugin updates after testing (which is now also partly automated as well), so I’m pretty confident yes πŸ™‚
    Off course best practise is and remains to test updates on non-production instances before applying the update on a business-critical site, but I’m sure you are doing that already πŸ˜‰

  8. I did ask on the ML one time but I would love to see for the future the stripping of code in individual pages that is not needed. For example, if I am using a youtube plugin on a single page, I’d love to see the code stripped from all others. Unfortunately, adding a youtuble plugin adds the code globally. Looking forward to testing and providing feedback on the beta. Thanks for the hard work.


Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.