• Resolved Ximbalo

    (@ximbalo)


    Hello,

    Having just installed and configured Autoptimize to minify the CSS & JS on a client site, I am very happy with the results, but — our SEM Rush site audit tool continues to complain about our site having unminified CSS & JS files, I believe, simply because Autoptimize does not use the .min extension for it’s generated files.

    Ultimately, as we have to present a clean “Bill of Health” SEO Audit Report to our client, I am now faced with having to install and test a number of other related plugins, but I don’t really want to.

    It would be really good to have an option to turn ON “Create .min files” in order to address this issue.

    In short: I think that your choosing to not use the .min file extension is kind of shooting yourself in the foot. Because you are going to have thousands of people who use your plugin to address this warning in various Audit Tools, only to find, like us with SEM Rush, that the same warnings continue to appear even after having used your plugin to minify those resources.

    Thank You,

    XIMBALO
    Professional WordPress Developer

    The page I need help with: [log in to see the link]

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Optimizing Matters

    (@optimizingmatters)

    ok, let’s do the following
    1. I tell you what to change (1 line of code)
    2. you make the change and test if that appeases Semrush
    3. if this works, I’ll add this in (either by default or behind a filter, not sure yet)

    so for (1);
    * open wp-content/plugins/autoptimize/classes/autoptimizeCache.php
    * on line 49 (assuming you’re using the default which is static files) change

    
    $this->filename = $ext . '/' . AUTOPTIMIZE_CACHEFILE_PREFIX . $md5 . '.' . $ext;

    into

    
    $this->filename = $ext . '/' . AUTOPTIMIZE_CACHEFILE_PREFIX . $md5 . '-min.' . $ext;

    * save changes, clear cache and test

    looking forward to your feedback,
    frank

    Thread Starter Ximbalo

    (@ximbalo)

    Frank,

    Hey – OK – Good, great answer.
    I’ll try and test that right now.

    FYI: I did try another plugin and it worked good until all Font Awesome icons everywhere on the site stopped working! So… Switching back to use your plugin now, with the edits that you advise.

    I will send a follow-up after I’m done.

    Thanks,

    XIMBALO

    Thread Starter Ximbalo

    (@ximbalo)

    Frank,

    I had to modify your code slightly as follows:
    $this->filename = $ext . '/' . AUTOPTIMIZE_CACHEFILE_PREFIX . $md5 . '.min.' . $ext;

    Note: “.min.” . $ext instead of “-min.” $ ext

    But that worked well and I am going to run our SEM Rush site-audit again now.

    Thank You!

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Possible to Create & Use .min files’ is closed to new replies.