This document contains outdated information.
I’ve revisited this topic recently, containing more relevant and up-to-date information aligning with the new specifications provided by Pingdom and Pagespeed Insights. If you’re looking for an up-to-date, quick and easy way to achieve a 100/100 on Pagespeed Insights and Pingdom. I suggest you follow that link.
When you’ve reached this point of this post, it might be because you haven’t still reached that perfect score on Google Pagespeed Insights or Pingdom. This can be because of very site specific issues.
That’s why I made a list of anything I ever ran into while optimizing a WordPress website. You might never make it to that perfect score, because your site is simply too dynamic. But only after you tried everything in the list below, you’ll know you did everything you could.
Pro-tips for Optimizing your WordPress website
Leverage Browser Caching: Host ga.js or analytics.js Locally
There’s a good chance you’re using Google Analytics to keep an eye on your website’s traffic. If so, then there’s no doubt you’re still getting the leverage browser caching suggestion from Google Pagespeed Insights and Pingdom. This sucks! Why would Google have Pagespeed Insights and set the caching rules of its own scripts to only 2 hours?
Appearantly they tweak the analytics script a lot. Almost daily. So it’s necessary that a browser grabs the latest version at all times. Understandable. But 2 hours!?
Thanks to yours truly, the WordPress Plug-ins catalogue now offers the perfect solution. Host ga.js or analytics.js locally (on your server) and update the script using a custom PHP-script and run that cronjob at a certain interval. [ Click the link. I promise it’ll be worth it. I won’t tell anyone. ]
Just like with the previous pro-tip, Google is the hero and the villain here as well. If you’re using Google’s (or any other) webfonts, you will still be getting the eliminate render-blocking in above-the-fold content suggestion from Google Pagespeed. Pingdom might tell you to leverage browser cache and to combine external CSS. There’s a lot of ground to win with this one, yet the sollution is so simple.
As with the Analytics-script, webfonts can be saved locally as well. You just need to download it, generate a webfont and adjust your CSS accordingly. You can find guides on how to do this in every corner of the web. To make it even easier for you, I’ve created a plugin which will automate hosting Google Fonts locally.
I would recommend this to anyone, because I don’t think anyone uses this feature in WordPress. Yet it is hard-coded in WordPress and can’t be disabled from within the settings.
wp-emoji.js is a script that can’t be aggregated by Autoptimize or any other minify plugin, which will always result in an extra DNS request and render-blocking content. Luckily this script can be easily disabled. Again, I would recommend this to every WordPress-site.
Reduce Server Response Time: Use Alternative PHP Cache
If you own a VPS or Dedicated Server, you should always have APC enabled. In some cases (such as mine) shared hosts also support APC. Enabling APC from within your servers administration panel (usually cPanel or DirectAdmin) will greatly reduce your server‘s response time. A guide on how to enable APC on a Shared Hosting package (if your host supports it) is coming soon…
Reduce Server Response Time: Use the latest PHP version
Recently PHP 7.0 was released to the public. Most hosts have silently upgraded your hosting package to support it as well. Version 5.6 is still the most widely supported version, but if your WordPress installation allows it, I greatly recommend you upgrade to version 7.0. It might reduce your server‘s response time with about 0.5 seconds. Look around in your hosts admin-panel and/or look into your admin-panel’s documentation. Before switching to PHP 7+, make sure your WordPress theme and plugins support PHP 7+.
16 thoughts on “How to get a 100/100 Score on Pingdom & Google Pagespeed Insights”
Hey there, I was going to ask you how to fix the mobile google analytics score but it looks like you have the same problem. https://gtmetrix.com/reports/daan.dev/HV5KT0Ue
Do you know what’s causing this? Does mobile have a different file?
Hmmm. Thanks for notifying me of this! I’ll look into it and get back to you. Thanks!
Thank you for this article! It’s helped my Pingdom score significantly. I couldn’t get it to work for the longest time because I still had “Minify” checked in W3 Total Cache. But once I did that it worked like a charm.
Oh, that’s good to hear! Thanks for stopping by!
Thank you for this article. But above the fold optimization plugin is not available for download. Some help would be appreciated
Here you go mate: https://github.com/optimalisatie/above-the-fold-optimization
Just click on the “Clone or download” green button and Download Zip.
You can then install it. Cheers!
Thanks for adding that link to the conversation, Clay! I didn’t know about that. As an other solution, the paid variant of Critical CSS generator auto-detects everything and allows you to skip a few steps in my tutorial. I should probably update this in the near future. [Updated the plugin’s link with the Github-variant. Thanks, Clay!]
Hi Clay – thanks for your time in putting this out there.
Any ideas why?
Any more input, very much appreciated.
Have you enabled Autoptimize and set it to combine CSS and JS? Autoptimize is usually very efficient in gathering all loaded JS and CSS files, so by tweaking its settings you should be able to have it completely combined!
Hey on my site http://www.onlinerechargetricks.com/beautiful-girls-dp-for-facebook-whatsapp-full-hd/ .google pagespeed is showing leverage browsing issue, can you tell me how to solve without plugin?
You’re using Adsense, which is externally hosted. So I suppose there’s no way for you to correct that. I’m working on a way to host Adsense locally as well, but this’ll take some time.