wordpress minify plugins

Minification is a popular way to optimize a WordPress website. There are plenty of WordPress minify plugins that can help you do it, but it’s hard to know which ones provide the best results without testing them first.

To save you some time and effort, I decided to test a few of the popular options out there while documenting the process. This way you’ll know whether or not they live up to their reputation (and ultimately, whether to use them).

Before we get into the tests, I’m going to briefly explain what minification is and how it can benefit your site. Then I’ll compare three of my favorite WordPress minify plugins to help you pick the best one.

Let’s get started! 🏃

What minification is (and how it can benefit your site) 🤔

Put simply, minification is the process of taking a piece of code and removing all unnecessary characters from it (think white spaces, line breaks, and so on). Minified files perform exactly the same as the original code, they just take up a little less space because they cut out extraneous information.

Minification commonly (though not exclusively) acts on site components like scripts and stylesheets. It can benefit your site by:

  • Decreasing loading times. Most modern websites use multiple scripts and stylesheets, which, when combined, result in longer loading times (and frustrated visitors). By minifying these things, you can help speed things up.
  • Obscuring your code from casual onlookers. Although minification doesn’t actually hide your site’s code, it does make it a bit harder for others to interpret. In other words, an experienced coder won’t be able to easily see what’s going on with your site’s code by glancing at it. It’s not a true security benefit in the sense that a truly determined person could “de-minify” the code if they wanted to, but it would require extra effort to do so.

One other important point worth mentioning here is that minifying on its own is unlikely to make a massive dent in your WordPress site’s page load times. However, it can cut your page load times by a couple of percentage points, which makes it a worthy tactic to implement alongside other strategies.

Three WordPress minify plugins compared 🔌

Now that you have a better understanding of what minification is (and its limitations), if you’d like to implement it, there are plenty of plugins that can help you do it. As I mentioned earler, the best way to know how efficient these plugins are is to test them.

To that end, I set up a test WordPress website using TasteWP and then installed five relatively complex plugins: WooCommerce, RankMath SEO, Optimole, Otter Blocks, and WP Reset. The last one was added mainly as a means of resetting the demo site settings between each plugin installation, thus ensuring a level playing field for each test. Here’s what the backend looked like:

The 5 plugins we installed as shown in the WordPress dashboard.

I also installed the Neve FSE theme because it allowed me a quick and easy way to add demo content to the site (thus increasing the “content weight”):

Using the Neve FSE theme setup wizard to quickly install demo content to the test site.

Setting a baseline

Before minifying any scripts, I did a baseline test on the home page using Pingdom Tools. I set the testing location to North America – USA – San Francisco and used this same location for all of the subsequent tests. The initial results were as follows:

Baseline Pingdom test results.

As you can see, my test received an overall performance grade of 85, with a page size of 1.4 MB and a loading time of 2.77 seconds.

Now let’s see what those numbers looked like with each of the plugins…

1. Autoptimize (Free)

Autoptimize is one of the most popular WordPress minify plugins around. Along with minifying your scripts, it can also bundle them together, cache them, and even set them to load later, in order to further optimize your website’s performance.

Testing the Autoptimize plugin ⏱️

Getting started with this plugin was very straightforward. I installed and activated it like any other plugin. Then I went to Plugins Installed Plugins.

I found Autoptimize on the list and clicked on Settings. This brought me into the admin area, where I found options to optimize my HTML, JavaScript, and CSS:

Autoptimize settings inside the WordPress dashboard.

For the test, I left everything on the default settings (which minified my JS, CSS, and HTML) but I didn’t touch any of the other tabs like images, extra, etc. I then clicked Save Changes and Empty Cache. Finally, I checked my loading times in Pingdom Tools:

While the page size and requests stayed the same, my overall performance grade went up a point and my load time decreased by 0.7 seconds.

These results weren’t life-changing, but could have a positive impact on user experience – particularly the reduced loading time.

After I ran this test I deactivated and deleted Autoptimize and used the WP Reset plugin (which I mentioned earlier) to bring the website back to its semi-initial state. The only elements I retained were the five installed plugins and my theme.

Using WP Reset to reset the test site.

Doing this also meant that I had to run the Neve FSE setup wizard again – so that I’d have the same demo content for the next test. Luckily, it only added on about 30 seconds of extra work.

It goes without saying, but I repeated this process for the remaining plugins after completing each test. Now let’s take a look at the next plugin on our list to see how it fared.

2. Fast Velocity Minify (Free)

Much like Autoptimize, Fast Velocity Minify lets you minify your HTML, CSS and JavaScript files, so that your servers have to deal with fewer requests.

Testing the Fast Velocity Minify plugin ⏱️

The beginning of this process was identical to what I did previously. After installing the plugin, I went to Plugins Installed Plugins and found Fast Velocity Minify. I then clicked on Settings. This brought me to – you guessed it – the settings.

The settings for Fast Velocity Minify inside the WordPress dashboard.

Unlike with Autoptimize though, I did make one minor adjustment here, which is that I checked off the Enable JS Processing option. For whatever reason, Fast Velocity Minify doesn’t have it checked by default.

I then ran my test and got the following results:

Fast Velocity Minify Pingdom test results.

Fast Velocity Minify performed similarly to Autoptimize. The page size didn’t budge, but both the performance grade and number of requests saw one point improvements. Loading time was once again the biggest winner, but not quite as good as Autoptimize. It was reduced by 0.45 seconds compared to Autoptimize’s 0.7.

This brings us to Merge + Minify + Refresh.

3. Merge + Minify + Refresh (Free)

As you can imagine from its name, Merge + Minify + Refresh works its magic by combining your CSS and JavaScript files and minifying them. It also caches them so your server doesn’t have to repeat the entire loading process each time they’re requested, and it automatically updates everything when you make changes to those files.

Worth noting though, is that unlike the other two plugins, it doesn’t touch your HTML.

Testing the Merge + Minify + Refresh plugin ⏱️

Another notable difference with Merge + Minify + Refresh is in the setup process. Once you install it, the minification automatically starts working by default. The settings menu is only there for you to deactivate aspects of it in a piecemeal manner or turn on other optimizations (e.g., Gzip compression).

To access the settings is also a bit different. From the WordPress dashboard, you have to go to Settings Merge + Minify + Refresh:

After activating the plugin, I tested my home page’s loading times once more and got the following:

These results were also interesting. It was the only plugin of the three that managed to reduce the baseline page size from 1.4 MB to 1.2 MB. However, the requests bizarrely shot up to 57 and the loading time was only reduced by 0.14 seconds.

A summary of my findings 📊

Overall, the results I found during my tests were in line with my expectations. Each plugin delivered a small increase in performance, but nothing out of the ordinary:

BaselineAutoptimizeFast Velocity MinifyMerge + Minify + Refresh
Performance Grade85868686
Page Size1.4 MB1.4 MB1.4 MB1.2 MB 🏆
Load Time
(Seconds)
2.772.07 🏆2.322.63
Requests444443 🏆57

🏆 = top performer in category

If we agree that loading time is probably the most important metric to pay attention to, then the top plugin turned out to be Autoptimize, with Fast Velocity Minify coming in second.

Merge + Minify + Refresh was a bit of a disappointment when it came to results, but it was still decent enough to consider using if you want something you can just install and forget about.

Final thoughts 💭

There are plenty of choices when it comes to WordPress minify plugins, but figuring out which one is right for you can be tricky.

The best way to do it is to test each of them and compare their performance. However, let’s be honest – few people have the time to do this themselves.

To make your job a little easier, we took it upon ourselves to test some of our favorite picks. Here is a recap of our results:

  • AutoptimizeDoes a good job of reducing loading time, which is arguably the most desired result.
  • Fast Velocity MinifyOffers solid optimization and multiple settings to help you customize your experience.
  • Merge + Minify + RefreshHas decent optimization results and is arguably the easiest option to use.

Do you have questions about any of these WordPress minification plugins? Let’s talk about them in the comments section below!

Yay! πŸŽ‰ You made it to the end of the article!

7 Comments
Newest
Oldest Most Voted
Inline Feedbacks
View all comments
futtta
August 26, 2018 12:41 pm

Thanks John, but I think you might need to reconsider the “no” in Autoptimize’s “additional settings available”. On the main tab there’s a “show advanced settings”-button near the top right and there’s some interesting extra’s on the “Extra” tab as well πŸ™‚

frank (AO dev)

Luis Angel Camargo
August 10, 2018 10:07 pm

Nice article. Wich plugin do you recommend to minify a website that has Visual Composer? We’re having issues to optimize the page speed of websites that use this plugin.

Rohit Agarwal
June 7, 2018 6:32 am

Its very useful info, I used Autoptimize because it is too popular.

Li_An
May 29, 2018 3:12 pm

Well, you missed the more importantβ€―: the plugin you need won’t break your site and is compatible with theme and other plugins. It’s the main problem with minification tools.

Giorgio Pregnolato
May 7, 2018 12:56 pm

Great article John! In my blog I used W3 Total Cache and Autoptimize. The site reaches a good score with Google PageSpeed of about 85 for the desktop version but, I would like to improve the values for the mobile version that are currently at 65. There is compatibility among the plugin ch I installed and Fast Velocity Minify?

Girdhari Choyal
March 9, 2018 10:12 am

If you need only minify HTML use this wordpress plugin ”
Lightweight HTML Minify”

Cam Macduff
February 20, 2018 1:54 am

Nice review and summary.

Or start the conversation in our Facebook group for WordPress professionals. Find answers, share tips, and get help from other WordPress experts. Join now (it’s free)!