In this Google PageSpeed Experiment, we’re testing W3 Total Cache’s Remove CSS/JS feature to understand its impact on website performance.
Our goal is to assess how this specific feature influences website speed.
VIDEO
Control Website
On our Control website we installed WordPress and the following plugins:
Contact Form 7
Molongui Authorship
My Calendar
Newsletter
Photo Gallery
Poll
Social Media and Share Icons (Ultimate Social Media)
TablePress
WordPress Related Posts Thumbnails
Control Website: https://wordpress-speed-test.com/03212024-a-before/
Experimental Website
With our experimental website, we installed WordPress with the same plugins as our Control Website.
We also installed W3 Total Cache Pro and configured the Remove CSS/JS features.
Experimental Website: https://wordpress-speed-test.com/03212024-a-after/
Experimental Website Changes
WordPress plugins often load CSS and JavaScript files, even on pages where they’re unnecessary.
For instance, on our Control Website, the Contact Form 7 plugin adds CSS and JavaScript to the homepage, although no contact form is present.
This extra, unused CSS and JavaScript are called ‘bloat’ and can slow down your website unnecessarily.
To address this, on our Experimental Website, we removed many of these unnecessary CSS and JavaScript files from the homepage.
In the screenshot below, you’ll notice that we’ve removed some scripts and styles from our homepage. For instance, we don’t have a poll running on our homepage, so we don’t need the associated scripts. They’re unnecessary clutter, so we got rid of them.
How the test was run
We conducted six tests on each website using the Google PageSpeed test and averaged all the scores.
-34%
Potential
Savings from
Unused
JavaScript
In this test, removing unused CSS and JS changed the Potential Savings From Unused JavaScript from 127.5 KiB to 84 KiB. Read the documentation to learn how you can remove unused CSS and JS.
Upgrade to W3 Total Cache Pro and improve your PageSpeed Scores today!
Test results
Desktop
Mobile
Performance
Performance score
Standard site
W3TC Optimized Difference
57.17
84.67
+27.5
+48.1%
Points per Metrics
First Contentful Paint
Standard site
W3TC Optimized Difference
0.17 points
8 points
+7.83 points
+4700%
Largest Contentful Paint
Standard site
W3TC Optimized Difference
3.17 points
17 points
+13.83 points
+436.84%
Total Blocking Time
Standard site
W3TC Optimized Difference
30 points
30 points
0 points
0%
No change.
Cumulative Layout Shift
Standard site
W3TC Optimized Difference
22.5 points
22.5 points
0 points
0%
No change.
Speed Index
Standard site
W3TC Optimized Difference
1 points
7.67 points
+6.67 points
+666.67%
Metrics
First Contentful Paint
Standard site
W3TC Optimized Difference
3.72 s
1.12 s
-2.6 s
-69.96%
Largest Contentful Paint
Standard site
W3TC Optimized Difference
4.78 s
1.88 s
-2.9 s
-60.63%
Total Blocking Time
Standard site
W3TC Optimized Difference
1.67 ms
0 ms
-1.67 ms
-100%
Cumulative Layout Shift
Standard site
W3TC Optimized Difference
0.07
0.07
0
0%
No change.
Speed Index
Standard site
W3TC Optimized Difference
4.58 s
1.73 s
-2.85 s
-62.18%
Diagnostics
Largest Contentful Paint element
Standard site
W3TC Optimized Difference
4783.33 ms
1895 ms
-2888.33 ms
-60.38%
Potential savings from render-blocking resources
Standard site
W3TC Optimized Difference
4891.67 ms
630 ms
-4261.67 ms
-87.12%
Potential savings by serving images in next-gen format
Standard site
W3TC Optimized
Passed audit
Passed audit
Time third-party code blocked the main thread for
Standard site
W3TC Optimized Difference
0 ms
0 ms
0 ms
No change.
Potential savings from unused CSS
Standard site
W3TC Optimized
59.17 KiB
Passed audit
Potential savings from unused JavaScript
Standard site
W3TC Optimized Difference
127.5 KiB
84 KiB
-43.5 KiB
-34.12%
Potential savings if Minifying CSS
Standard site
W3TC Optimized
3 KiB
Passed audit
# of static assets without an effecient cache policy
Standard site
W3TC Optimized Difference
53
20
-33
-62.26%
JavaScript execution time
Standard site
W3TC Optimized Difference
0 s
0 s
0 s
No change.
Main-thread work
Standard site
W3TC Optimized Difference
0.43
0.28
-0.15
-34.62%
# of long main-thread tasks
Standard site
W3TC Optimized
1
Passed audit
Initial server response time
Standard site
W3TC Optimized Difference
396.67 ms
393.33 ms
-3.33 ms
-0.84%
# of large layout shifts
Standard site
W3TC Optimized Difference
1.5
1.5
0
0%
No change.
# of user timings
Standard site
W3TC Optimized
Passed audit
Passed audit
# of animations found
Standard site
W3TC Optimized
Passed audit
Passed audit
Network payload
Standard site
W3TC Optimized Difference
1401.5 KiB
1167.5 KiB
-234 KiB
-16.7%
DOM size
Standard site
W3TC Optimized Difference
225
208
-17
-7.56%
# of chains found
Standard site
W3TC Optimized Difference
50
15
-35
-70%
Defer offscreen images
Standard site
W3TC Optimized
Passed audit
Passed audit
Minify JavaScript
Standard site
W3TC Optimized
3 KiB
Passed audit
Properly size images
Standard site
W3TC Optimized Difference
232.67 KiB
232.67 KiB
0 KiB
0%
No change.
Efficiently encode images
Standard site
W3TC Optimized
Passed audit
Passed audit
Enable text compression
Standard site
W3TC Optimized
Passed audit
Passed audit
Preconnect to required origins
Standard site
W3TC Optimized
Passed audit
Passed audit
Preload key requests
Standard site
W3TC Optimized
Passed audit
Passed audit
Preload Largest Contentful Paint image
Standard site
W3TC Optimized
Passed audit
Passed audit
Avoid multiple page redirects
Standard site
W3TC Optimized
Passed audit
Passed audit
Use video formats for animated content
Standard site
W3TC Optimized
Passed audit
Passed audit
Remove duplicate modules in JavaScript bundles
Standard site
W3TC Optimized
Passed audit
Passed audit
Avoid serving legacy JavaScript to modern browsers
Standard site
W3TC Optimized Difference
0
0
0
No change.
Largest Contentful Paint image was not lazily loaded
Standard site
W3TC Optimized
Passed audit
Passed audit
Avoids document.write()
Standard site
W3TC Optimized
Passed audit
Passed audit
Image elements have explicit width and height
Standard site
W3TC Optimized Difference
0
0
0
No change.
Has a <meta name="viewport"> tag with width or initial-scale
Standard site
W3TC Optimized
Passed audit
Passed audit
Uses passive listeners to improve scrolling performance
Standard site
W3TC Optimized
Passed audit
Passed audit
All text remains visible during webfont loads
Standard site
W3TC Optimized
Passed audit
Passed audit
Performance
Performance score
Standard site
W3TC Optimized Difference
55.17
75
+19.83
+35.95%
Points per Metrics
First Contentful Paint
Standard site
W3TC Optimized Difference
0 points
6.83 points
6.83 points
Largest Contentful Paint
Standard site
W3TC Optimized Difference
0.17 points
8 points
+7.83 points
+4700%
Total Blocking Time
Standard site
W3TC Optimized Difference
29.83 points
29.83 points
0 points
0%
No change.
Cumulative Layout Shift
Standard site
W3TC Optimized Difference
24.5 points
24.33 points
-0.17 points
-0.68%
Speed Index
Standard site
W3TC Optimized Difference
0.5 points
5.83 points
+5.33 points
+1066.67%
Metrics
First Contentful Paint
Standard site
W3TC Optimized Difference
7.75 s
2.45 s
-5.3 s
-68.39%
Largest Contentful Paint
Standard site
W3TC Optimized Difference
9.97 s
4.8 s
-5.17 s
-51.84%
Total Blocking Time
Standard site
W3TC Optimized Difference
58.33 ms
46.67 ms
-11.67 ms
-20%
Cumulative Layout Shift
Standard site
W3TC Optimized Difference
0.04
0.05
+0.01
+33.33%
Speed Index
Standard site
W3TC Optimized Difference
12.07 s
5.28 s
-6.78 s
-56.22%
Diagnostics
Largest Contentful Paint element
Standard site
W3TC Optimized Difference
9958.33 ms
4793.33 ms
-5165 ms
-51.87%
Potential savings from render-blocking resources
Standard site
W3TC Optimized Difference
9335 ms
1093.33 ms
-8241.67 ms
-88.29%
Potential savings by serving images in next-gen format
Standard site
W3TC Optimized
Passed audit
Passed audit
Time third-party code blocked the main thread for
Standard site
W3TC Optimized Difference
11.67 ms
10 ms
-1.67 ms
-14.29%
Potential savings from unused CSS
Standard site
W3TC Optimized
59.17 KiB
Passed audit
Potential savings from unused JavaScript
Standard site
W3TC Optimized Difference
127.17 KiB
84.17 KiB
-43 KiB
-33.81%
Potential savings if Minifying CSS
Standard site
W3TC Optimized
3 KiB
Passed audit
# of static assets without an effecient cache policy
Standard site
W3TC Optimized Difference
53
20
-33
-62.26%
JavaScript execution time
Standard site
W3TC Optimized Difference
0.35 s
0.32 s
-0.03 s
-9.52%
Main-thread work
Standard site
W3TC Optimized Difference
1.4
1.07
-0.33
-23.81%
# of long main-thread tasks
Standard site
W3TC Optimized Difference
7.67
6.17
-1.5
-19.57%
Initial server response time
Standard site
W3TC Optimized Difference
643.33 ms
371.67 ms
-271.67 ms
-42.23%
# of large layout shifts
Standard site
W3TC Optimized Difference
1
1
0
0%
No change.
# of user timings
Standard site
W3TC Optimized
Passed audit
Passed audit
# of animations found
Standard site
W3TC Optimized
Passed audit
Passed audit
Network payload
Standard site
W3TC Optimized Difference
1401.17 KiB
1167.5 KiB
-233.67 KiB
-16.68%
DOM size
Standard site
W3TC Optimized Difference
225
208
-17
-7.56%
# of chains found
Standard site
W3TC Optimized Difference
50
15
-35
-70%
Defer offscreen images
Standard site
W3TC Optimized
Passed audit
Passed audit
Minify JavaScript
Standard site
W3TC Optimized
3 KiB
Passed audit
Properly size images
Standard site
W3TC Optimized Difference
304 KiB
304 KiB
0 KiB
0%
No change.
Efficiently encode images
Standard site
W3TC Optimized
Passed audit
Passed audit
Enable text compression
Standard site
W3TC Optimized
Passed audit
Passed audit
Preconnect to required origins
Standard site
W3TC Optimized
Passed audit
Passed audit
Preload key requests
Standard site
W3TC Optimized
Passed audit
Passed audit
Preload Largest Contentful Paint image
Standard site
W3TC Optimized
Passed audit
Passed audit
Avoid multiple page redirects
Standard site
W3TC Optimized
Passed audit
Passed audit
Use video formats for animated content
Standard site
W3TC Optimized
Passed audit
Passed audit
Remove duplicate modules in JavaScript bundles
Standard site
W3TC Optimized
Passed audit
Passed audit
Avoid serving legacy JavaScript to modern browsers
Standard site
W3TC Optimized Difference
0
0
0
No change.
Largest Contentful Paint image was not lazily loaded
Standard site
W3TC Optimized
Passed audit
Passed audit
Avoids document.write()
Standard site
W3TC Optimized
Passed audit
Passed audit
Image elements have explicit width and height
Standard site
W3TC Optimized Difference
0
0
0
No change.
Has a <meta name="viewport"> tag with width or initial-scale
Standard site
W3TC Optimized
Passed audit
Passed audit
Uses passive listeners to improve scrolling performance
Standard site
W3TC Optimized
Passed audit
Passed audit
All text remains visible during webfont loads
Standard site
W3TC Optimized
Passed audit
Passed audit