Getting 100/100 score in Google Page Speed Insights on WordPress
How to gain a score of 100/100 points in Google Page Speed tool?
Basically, it’s quite easy. It requires two elements:
1. Good hosting provider.
2. Website optimizations.
Firstly, we have created a page based on WordPress. The goal was clear: to get the score of 100/100 points on a standard WordPress installation in Google Page Speed Insights analyser in the easiest possible way.
Google Page Speed – HOSTING CHOICE
Usually, when analysing the page, one of the problems that is submitted by Google Page Speed Insights tool is a lot of errors concerning software. But there is one error that the optimization does not have an impact on:
Reduce server response time
Our test WordPress was installed on www.smarthost.eu server on an ordinary hosting account that was created by standard purchase procedure on the hosting provider’s website. The package base-www was chosen, which costs 29 € annually.
To make it a bit harder, an SSL certificate, that is always free of charge on Smarthost.eu hosting, was generated on the test website for its domain.
On the one hand, Google recommends using the encrypted pages, although the certificate requires page encryption and may slightly slow down the loading time of the page. Despite that, we will try tests with SSL certificate.
Google Page Speed – WEBSITE OPTIMIZATION
Implicitly, after the installation of WordPress 4.8 (the latest version for a moment of test execution), it achieves 76 points for the computers and 66 points for the mobile devices.
However it is enough to install a few simple plugins to increase the score significantly.
We have installed the optimization plugins. Of course, these are the examples of plugins that do things we need, because WordPress itself offers a lot of similar ones that do things very alike. The ones we have chosen… we liked them (however unprofessional it sounds). The important thing is that they fulfilled the role they were given 😉
At the beginning we enable the compression; usually it has to be done manually. It is enough to just paste the following lines to .htaccess file located in the main catalogue of our WordPress.
The thing with the compression is that it does not have to be supported by the hosting server; not all the servers support it. Our testing server supports the gzip compression correctly.
The following code is best to paste at the beginning of .htaccess file:
# Opimization – Begin <IfModule mod_expires.c> ExpiresActive On ExpiresByType image/jpg "access 1 week" ExpiresByType image/jpeg "access 1 week" ExpiresByType image/gif "access 1 week" ExpiresByType image/png "access 1 week" ExpiresByType text/css "access 1 week" ExpiresByType text/html "access 1 week" ExpiresByType application/pdf "access 1 week" ExpiresByType text/x-javascript "access 1 week" ExpiresByType application/x-shockwave-flash "access 1 week" ExpiresByType image/x-icon "access 1 week" ExpiresDefault "access 1 week" </IfModule> <FilesMatch "\\.(js|css|html|htm|php|xml)$"> SetOutputFilter DEFLATE </FilesMatch> <IfModule mod_gzip.c> mod_gzip_on Yes mod_gzip_dechunk Yes mod_gzip_item_include file \.(html?|txt|css|js|php|pl)$ mod_gzip_item_include handler ^cgi-script$ mod_gzip_item_include mime ^text/.* mod_gzip_item_include mime ^application/x-javascript.* mod_gzip_item_exclude mime ^image/.* mod_gzip_item_exclude rspheader ^Content-Encoding:.*gzip.* </IfModule> # Opimization – End
Adding the code above solves the problems that are reported by Page Speed: the first part is: “Use the browser cache”, and the second part of the code resolves: “Enable the compression”.
Google Page Speed – PLUGINS INSTALLATION
We have installed the following plugins:

PLUGIN: Fast Velocity Minify
The plugin solves the optimization tips:
Minify CSS
and
Minify JavaScript
PLUGIN: Scripts-To-Footer
The plugin solves the optimization tips:
Eliminate render-blocking JavaScript and CSS in above-the-fold
PLUGIN: Google Webfont Optimizer
The plugin solves the optimization tips:
Eliminate render-blocking JavaScript and CSS in above-the-fold
and improves the way the Google fonts embed on the website.
PLUGIN: MemcacheD Is Your Friend
Installation of the plugins above gives us the score of 97. To achieve the score of 100 points some form of cache has to be enabled. One of the most efficient forms of caching is the use of server memory.
Smarthost.eu offers memcacheD system that can be used. It is activated for PHP in version 7.0 and 7.1. That is why the version of PHP has to be changed (to 7.1 in our case) and the plugin “MemcacheD is Your Friend” has to be installed – it is going to detect and use this caching system.
After all the actions above are taken, we achieve the score of 100/100 points in Google Page Speed Insight tool:

100 points of score on Google Page Speed
