Does Minification Improve Performance? I Tested 8,324 WordPress Files
I minified 8,324 CSS and JavaScript files from the most popular WordPress plugins and themes, loaded real pages in Lighthouse and tested 11 ways minification breaks sites. Here is what it still does in 2026.
Every speed checklist says to minify your CSS and JavaScript. PageSpeed Insights still flags it. Most optimization plugins have a checkbox for it. But the web has changed a lot since that advice became standard. Servers compress files, browsers parse code faster, and most plugins already ship minified files.
So I tested it. I downloaded the 40 most popular WordPress plugins, 12 popular themes and WordPress core, minified every CSS and JavaScript file, and measured what changed. Then I loaded real pages in Chrome on a throttled phone connection, and ran tests to see when minification breaks a site.
In short: Minification still saves bytes, but far less than most people think once files are compressed. After Brotli, minifying JavaScript saved about a third of the remaining size and CSS about a sixth. Most single files saved less than 1 KB. On a real WordPress page, minifying the files that were not already minified saved 5 KB and changed load time by 2 ms. Minification itself rarely breaks anything. What breaks sites is aggressive settings and combining files.
Does minification improve performance?
Yes, but only a little on a modern server. Minification removes spaces, comments and long names from code. Compression like gzip or Brotli already squeezes out most of that same repetition. So when both are used, minification only adds a small extra saving on top.
The exception is a server with no compression. There, minification makes a big difference. In the 2024 Web Almanac, about 12% of JavaScript requests on mobile were still sent with no compression at all.
What I tested
- Files: the 40 most popular plugins and 12 popular themes from WordPress.org, plus WordPress 7.1.4. After removing duplicate files, that left 8,324 unique CSS and JavaScript files.
- Minifiers: Terser and esbuild for JavaScript. Lightning CSS and clean-css for CSS. All on default settings.
- Compression: gzip level 6 and Brotli level 5, which are typical server settings, plus Brotli level 11 for files compressed ahead of time.
- Page loads: a WooCommerce and Elementor style page built from real WordPress core, Elementor and WooCommerce files. Lighthouse 13 in Chrome on the mobile profile, with the same simulated throttling PageSpeed Insights uses, 9 runs per setup.
- Parse time: 36 large JavaScript files compiled 40 times each in V8, the engine Chrome uses.
- Breakage: 11 common patterns, each run in real Chrome before and after minifying.
Most WordPress files are already minified
Before minifying anything, I checked how much was already done. Plugin and theme developers now minify files in their build process before they release.
| Unique files | Already minified (files) | Already minified (bytes) | |
|---|---|---|---|
| JavaScript | 5,264 | 54% | 69% |
| CSS | 3,060 | 61% | 70% |
Some unminified files are never loaded by visitors at all. 448 of them were source files written in JSX, which browsers cannot run as they are. Others are readable copies that ship next to the minified version.
Minification vs compression: how much each one saves
Next I took every file that was not minified and measured four versions: as is, minified, compressed, and both.
| Minify only | Brotli only | Both | Extra saving from minify after Brotli | |
|---|---|---|---|---|
| JavaScript (1,969 files, 95.6 MB) | 51.5% | 81.1% | 87.5% | 34.1% |
| CSS (1,189 files, 17.0 MB) | 18.4% | 84.5% | 87.2% | 17.4% |
Compression does most of the work. Minifying JavaScript alone cuts it in half. Brotli alone cuts it by 81%. Using both gets you to 87.5%, so minification adds about 6 points of the original size.
Per file, the numbers are smaller still. After Brotli, the median JavaScript file saved 340 bytes from minification and the median CSS file saved 95 bytes. 74% of JavaScript files and 91% of CSS files saved less than 1 KB. Only 108 JavaScript files out of 1,969 saved more than 10 KB. The biggest were bundles like the WordPress block editor and the Elementor editor, which load in the admin area, not for visitors.
The two JavaScript minifiers gave almost the same result. esbuild produced slightly smaller raw files, and Terser slightly smaller compressed files. For CSS, Lightning CSS beat clean-css by a small margin.
What it changed on a real page load
Bytes are not the same as speed, so I built a test page from real WordPress files. It loads the block library, Elementor and WooCommerce stylesheets, a theme stylesheet, jQuery and the Elementor and WooCommerce front end scripts. I served it unminified and minified, with Brotli and with no compression, and ran Lighthouse 9 times for each setup. The table shows the median.
| Setup | Downloaded | LCP | Lighthouse score |
|---|---|---|---|
| Brotli, as WordPress serves it | 116 KB | 1.66 s | 99 |
| Brotli, every file minified | 110 KB | 1.65 s | 99 |
| Brotli, nothing minified (debug mode) | 193 KB | 2.25 s | 96 |
| No compression, as WordPress serves it | 546 KB | 4.35 s | 74 |
| No compression, every file minified | 518 KB | 4.20 s | 76 |
| No compression, nothing minified | 942 KB | 6.30 s | 62 |
The row that matters is the first one. WordPress, Elementor and WooCommerce already load their own minified files, unless a site turns on debug mode. So on a normal site, a minify setting only touches what is left, here mostly the theme stylesheet. Minifying those saved 5.4 KB and changed LCP by 2 ms. The Lighthouse score stayed at 99.
For stylesheets, size is only part of the story. Every stylesheet in the head stops the page from showing until it has downloaded. If that is slowing your site down, here is how to optimize CSS delivery in WordPress.
Without compression, the same step saved 29 KB and 150 ms of LCP. That is a real gain, but turning on compression saved far more: about 430 KB and 2.7 seconds.
The big difference only shows up when nothing is minified at all. Then minifying cut LCP by 0.6 seconds with Brotli. One file caused most of it. The readable copy of jQuery is full of comments, and minifying it alone saved 48.7 KB after Brotli. This is what a site looks like with WordPress debug mode left on, and it explains why minification used to matter so much.
Does minified JavaScript parse faster?
A common claim is that minified code runs or parses faster. I compiled 36 large JavaScript files in V8, the engine inside Chrome, 40 times each.
Minifying cut their total size from 49.8 MB to 23.1 MB. Compile time dropped from 523 ms to 380 ms on an Apple M1. That is about 5 ms saved for every 1 MB removed. On a mid range phone, which is several times slower, expect roughly 20 to 25 ms per MB. A typical page sends far less than 1 MB of unminified code, so the parse saving is a few milliseconds.
I did not measure how fast the code runs after it loads. Minifiers are designed to keep code doing the same thing, so a big change there would be unexpected.
When minification breaks JavaScript and CSS
Broken sites are the real cost of minification, so I tested 11 patterns that show up on WordPress sites. Each one ran in real Chrome before and after processing.
| Pattern | Default minify | What broke it |
|---|---|---|
| Global function called from an onclick handler | Safe | Mangling top level names |
| File with no trailing semicolon, combined with the next file | Safe | Combining files with only a new line between them |
| Strict mode file combined with older code | Safe | Combining files. Strict mode then applies to the old code too. |
| Code that reads class or function names | Safe | Mangling top level names |
| Reading offsetWidth to restart a CSS animation | Safe | The pure_getters and unsafe options |
| Code that reads its own parameter names | Broke | Any name shortening. Common in old AngularJS code. |
| console.log with a side effect inside it | Safe | The drop_console option |
| calc() with spaces around + and – | Safe | Old regex based CSS minifiers |
| A stylesheet that uses @import | Safe | Combining CSS files. The @import is ignored. |
| One unsupported selector in a merged rule | Safe | Merging selectors into one rule |
| Relative font and icon paths | Safe | Combined CSS saved to a cache folder without fixing the paths |
Modern minifiers on default settings were safe in 10 of 11 cases. Almost every break came from two things: aggressive options that assume your code follows rules it may not follow, and combining several files into one. Combining is often bundled with minification in optimization plugins, which is why people blame minification for it.
I also checked whether the minifiers could handle real WordPress code. Every browser ready JavaScript file in the set minified without errors, except two. Both were ES modules, including WordPress’s own Interactivity API script. They fail when a minifier treats them as classic scripts. WordPress now loads more code as modules, so this is worth checking if your optimization plugin is older.
Where minification stands today
- Cloudflare dropped it. Cloudflare removed its Auto Minify feature on 5 August 2024. It said minifying was less effective at cutting page weight than its work on compression.
- Lighthouse still flags it, with no direct score weight. Lighthouse 13 still has Minify CSS and Minify JavaScript audits. Like all its suggestions, they carry no weight in the score. They only matter through the speed metrics they change. Lighthouse also ignores a file if minifying would save less than 2 KB.
- Compression is now normal. In the 2024 Web Almanac, 45% of mobile JavaScript requests used Brotli and 41% used gzip.
- The leftover is small. The same report found that the median mobile page ships about 12 KB of JavaScript that could still be minified.
Should you minify CSS and JavaScript in WordPress?
- Turn on compression first. Check that your host or CDN sends Brotli or gzip. This matters far more than minifying.
- Minify, but on safe settings. It is a small free saving. Use a tool that runs modern minifiers on default settings and skips files that are already minified.
- Be careful with combining files. On HTTP/2 and HTTP/3, combining files is rarely needed, and it causes most of the breakage.
- Do not expect it to fix a slow site. If your site is slow, start with page caching, which speeds up how fast your server responds. This comparison of the best WordPress caching plugins can help you pick one. Then look at render blocking files, images and unused code.
- Test after you turn it on. Click through menus, forms, sliders and checkout, and check the browser console for errors.
FAQ
Is minification still worth it in 2026?
Yes, as a small free win when it is done safely. It is not a big speed fix. On a server with Brotli or gzip, the saving per file is usually under 1 KB.
What is the difference between minification and compression?
Minification rewrites the file itself by removing spaces, comments and long names. Compression packs the file for transfer and the browser unpacks it. They overlap, which is why using both saves only a little more than compression alone.
Can minification break my website?
Rarely on its own. In my tests, default settings broke only code that reads its own source. Aggressive options and combining files caused almost every other break.
Does minification improve Core Web Vitals?
Only slightly on most sites. On my test page, as WordPress normally serves it, minifying the rest changed LCP by 2 ms. It matters more when nothing is minified or the server does not compress files. In the worst case, LCP improved by 2.1 seconds.
Limits of this study
The page load test used one test page served from a local machine, so it shows the effect of file size alone. I also ran it with real network throttling, where single runs varied by about 650 ms. That noise was about as large as the biggest difference between setups, so I report the simulated results. Real sites add server time, distance and images. The breakage tests cover known patterns, not every plugin. I build BerqWP, a WordPress speed plugin, so I have an interest in this topic. The tests, tools and settings are all listed above so anyone can repeat them.