Updated: September 2019
There are no affiliate links on PagePipe.
Minification is not an important optimization tactic for mobile speed.
There are 31 minification plugins in the WordPress directory. They vary from 3.8k to 6.6M Gzip-compressed file size. The plugins may be fresh and updated – or as stale as 8 years. What good are minification plugins? Why are they common recommendations for speed? Do they make a difference? Why do they often break your website?
Claims are: Minification plugins lead to faster page render times. These plugins reduce bandwidth consumption. Unbeknown to site owners, minification plugins lump several functions together. One function is minification – another is concatenation.
NOTE: If code is offsite, like Facebook scripts, it won’t concatenate. It’s out of the control (reach) of the plugin. That code resides on a different protected server. No luck. Offsite third-party scripts – like WebFonts or GoogleAds – kill speed.
Minification by itself is harmless. It’s removes white space and comments from HTML, CSS and JS code. There was a time when minification (white space removal) was significant. This was before the days of standard Gzip compression on servers. All modern browsers have Gzip activated for decoding or decompressing. Before Gzip, white space made a difference of 10 percent to 30 percent reduction in file size. In the days of slow dialup modems, programmers hand removed white space and comments. That was worthwhile. But not any more.
When compressing a file with Gzip, file reduction is as much as 70 percent. Gzip codifies redundancy caused by code duplication. Additional white space removal, after Gzip compression changes, file size is less than 1 percent difference. Pretty minuscule benefit. So why even do it? Well, it doesn’t break anything.
We’ve done tests. After enabling Gzip, minification (white space removal) only reduces file sizes by an extra one percent. Small speed reward.
Doesn’t minification increase the chances of site breakage?
Minification is OK. But concatenation can really mess things up. Most minification plugins minify – and concatenate. Minification is safe white-space removal. Concatenation is the more risky combining of scripts. Beware.
Example: Before adding Autoptimize plugin.
Below are Pingdom.com test results with no concatenation. We see that there are 23 HTTP requests. Each “call” is in the waterfall of file requests. Page weight is lightweight: 132k. Speed is fast: 363 milliseconds. This also shows how the web assets load in parallel improving speed.
After adding Autoptimize plugin.
After adding concatenation, the number of requests is 11. Much less. Reduction in page weight is 116k (a 16k reduction) and speed is 137 milliseconds faster.
Is improving page speed from 363 milliseconds to 226 milliseconds significant? Does it matter?
As speed freaks, we’d like to think so. But most desktop site visitors can’t perceive those kinds of speed difference. They see 1-second page changes as almost instantaneous. No waiting. But a 100 millisecond change is transparent.
For mobile speed, 100 milliseconds is a big gain. But not if it breaks your site.
Offsite Link: Minification – Explained in Plain English. WP Rocket. (We highly recommend this article).
Why not take advantage of the improvement? We’ll keep Autoptimize plugin installed. But if there is any sign of problems, forget it. It’s better to have a stable and usable site than a fast flaky one. Quality is important for credibility and usability.
Minification plugins are nice when they work. But more often than not, concatenation breaks your website in some odd way. Reducing the number of HTTP requests is nice. But parallel delivery makes a bigger difference in speed than minification and concatenation. You don’t control that. Browsers have changed and allow more parallel loading than ever before. The pipe is bigger.
Concatenation is a process that often doesn’t work “out of the box.” You need trial and error by switching on and off options. You may not eliminate all render-blocking resources without breaking the site. In fact, we gamble you’ll break your site before you’re done.
So what breaks most often:
- Responsive navigation elements disappear.
- Email or ecommerce signups malfunction.
- Page resets (refreshes or loads) produce HTML unstylized pages.
- Delayed pages rebuild like cold molasses before your eyes.
- Disappearing page elements such as menus.
These are all signs of concatenation messing things up. You may get the white screen of death. It’s happened to us. And we thought we were careful.
How much speed from minification plugins when combined with gzip compression?
Minification/concatenation combined with Gzip give some improved speed results. Gzip is a general, generic algorithm. It’s required protocol in our best-practices tricks. Minification is aware about content and does improvements general compression algorithms can’t. When it completely eliminates comments and whitespaces – that’s 100% data compression. There is no harm. Concatenation is always the real problem.
ONLINE MINIFICATION TOOLS
We have used this tool to minify CSS child themes using copy and paste.
Our Recommendation: Test minification plugins. If they break your site, forget about it. We do minification – if it doesn’t affect the theme functions. But often we invent workarounds. Any sign of trouble and we may try a couple more favorite minify plugins and then quit. Not worth the grief.
If there wasn’t some “measurable goodness,” we wouldn’t minify. Often, it’s only a psychological benefit. There’s therapeutic value for those afflicted with Speed OCD.
Feel guiltless if you drop minification.
What are our favorite Minification plugins?
Zip archive 152k
Active installs: 1 million+
Better WordPress Minify
Active installs: 60,000+
Zip archive: 655k
Speed Booster Pack
Active installs: 30,000+
Zip archive: 230k
We found Speed Booster Pack’s minification features succeed where other minification plugins caused conflicts or white screens. It’s not for everyone but worth noting here.
Mobile WordPress Speed – without coding!
for WooCommerce professionals only
How WooCommerce hurts mobile speed, and what you can do about it. Nine unusual speed tips.
☑ Free for a limited time. Signup required.
What you get:
9 unconventional WooCommerce speed tips.
+2776.3 milliseconds potential extra speed per Woo page.
Free same-day shipping to your email in-box. No purchase or credit card required.
(ɔ) Copyleft License
This work remains available to all. You have the right to freely distribute copies of WooComa with others.
If MailChimp messes up and doesn’t deliver your free report, email us and we’ll kick their monkey butt.