The last couple of days I’ve spent some time to further improve performance of petersplugins.com and I’d like to share the results.
First I have to mention that I already was using Comet Cache as Caching solution for quite some time. And since not long ago I’m using Cloudflare as CDN (Content Delivery Network). With those fundamentals I’ve been pretty satisfied already. But I wanted to achieve more.
The Numbers First
The total page size of the homepage was 126 KB before which is already pretty lean. I was able to reduce this to 111 KB. This is a reduction of 12% in size. The number of requests decreased from 18 to 11 which is about 38% less. The page load time measured with Pingdom in several tests from different locations now is between 420 milliseconds and 1.2 seconds which is according to Pingdom between 85% and 95% faster than all other tested sites.
The results are amazing for me.
Pingdom now rates petersplugins.com with a performance grade of 99 out of 100.
The GTmetrix PageSpeed score is now 99%, the YSlow score is 93%.
Google PageSpeed Insights now rates petersplugins.com with a speed score of 100 points out of 100 possible. The User Experience score is also 100 points out of 100 possible.
Strangely the Google Pagespeed Insights test tells to leverage browser cache when using Google Analytics. One Google tool criticizes another Google tool… After fiddling around a while I came across the plugin Complete Analytics Optimization Suite. This is a real nice solution for that!
The next thing I’ve done is to pack all the external CSS files into the HTML. Since I could not find a satisfying solution I coded this my own. It is a quick and dirty solution. It works for me but does not provide for all contingencies. So it may not work on other sites. For that reason I’m not publishing the solution here. Maybe I’ll add it to the Code Snippets section any time soon.
Also I pieced together a simple minimization for CSS and HTML code for my one to avoid more plugins and to not make it needlessly complicated. I’ll add this code to the Code Snippets also in future.