Introducing zytzagoo’s major changes for Autoptimize 2.4

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]

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

  1. menachem

    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.

    1. frank Post author

      indeed not in the main scope of the plugin, but I’ll add it to the list of ideas, who knows it gets implemented one day :)

  2. Vlad

    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!

    1. frank Post author

      Well, there’s less risk of things breaking + some people prefer this when on HTTP/2 (where aggregation in some cases can be counter-productive).

      1. Gulshan

        Hi dear,

        In that people list, I am one :P
        I am going to test this plugin without any further delay.

        Thanks Regards,

  3. Vibhi

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

    1. frank Post author

      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. Vibhi

    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. Vibhi

    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

    1. frank Post author

      OK, so it’s a generic Autoptimize thing, not a problem with this beta specifically :)

      Did you already have look at Autoptimize’s troubleshooting tips in the FAQ?


Leave a Reply

Your email address will not be published. Required fields are marked *