The obsession of optimization
UPDATE: As of April 1, 2020, this site is no more running on Twenty Twenty theme. But I (almost once in a week) continue to seek for ways to make it more performant.
Cette note est aussi disponible en Français.
I am writing this note, previously in French, for the needs of my services page, which I recently created.
I wrote in an earlier note: The obsession of optimization [FR]. Today, I’m updating it.
So I’m obsessed with the performance of my site segbedji.com. Obsessed by its speed, its ranking in the main SERP, its security, etc…
This is a personal matter for me. Very personal. I present myself as a talented WordPress developer. It goes without saying that my site, built with this CMS should be a credible example of what I claim to offer!
I’m going to talk today (in issue 89 of my #DailyNotes ??) about the different things I’ve had to do, and continue to do on the site.
As I said before, my site has to be fast. Very fast. Excessively fast (well, within the limits of what is possible). So I had to opt for a WordPress lite theme that I could boost with a few tricks of my own.
The opportunity was too perfect with 2020, the new official default WordPress theme, coming with 5.3 (version for which I was part of the release team, coordinating the technical documentation).
2020 was designed by the excellent Anders Norén, and its development was coordinated by Ian Belanger. I myself made some fixes to the theme during the early stages of its development.
So I started with a child theme of 2020 whose source code is currently hosted on my GitHub account.
Pictures are usually one of the biggest resources on a website. So I’m careful to upload only images that have been optimized beforehand (size, weight). So I was more than happy when the automatic sizing feature for large images came with WordPress 5.3 (kudos to our dear Andrew for the work done on this).
Images are also converted to WebP format for further optimization. Also, I now only use it when strictly necessary.
Next to it, I have the excellent, must-have WP Rocket ? for site optimization. Basically, caching, preloading the cache, minimizing and compressing script and style files are provided.
I tested for a few weeks the image preloading feature, which I then left. This because WP Rocket adds a script on the site to manage it. One less script to load, which was going to deprive ?. Not me, that’s for sure. Also, Chrome natively supports preloading since a few weeks. So as soon as I have some time, I’ll contribute to the ticket opened by Morten on Core Trac to integrate it to WordPress.
Another aspect, the plugins. The popular belief is that the more active plugins you have on a WordPress site, the slower it is. That’s not exactly true. A site with 30 active plugins can be faster and more performant than one with 3.
I’ve limited the active plugins on the site to the bare minimum. The list can be found on my legal notice page.
I have also disabled comments on the site. So no more comment scripts to load (although this is not the main reason for this action).