Clients often want to know what a freelancer will do before hiring them, particularly in terms of speed optimization. While it is a reasonable request in a broad sense, freelancers may prefer not to disclose too much detail. There are those clients that will ask for the information, and then use the specifics provided to hire a cheaper freelancer to do the work. This comes down to an unpaid consultation. There are also freelancers who bid on work that they are not qualified to do.
Instead of specifics, I will outline my process. I am available for consultations and for implementation.
Everything Starts With DNS
In simple terms, DNS is a system of linking a domain name to the specific server where the website associated with the website resides. Where your DNS ultimately responds from can have a large impact on your page load speed. Typically, free DNS providers respond slower to queries than premium providers, with the notable exception of Cloudflare. Visit DNSPerf for up to date statistics.
A website hosted on a slow DNS server can benefit from moving its DNS resolution to another service.
Additional reading: What is DNS? by Cloudflare.
Hosting Environment
Shared hosting, managed WordPress hosting, VPS or dedicated server? Apache, NGiNX or LiteSpeed? Using a CDN or not? Serving content over HTTP/1.1, HTTP/2 or HTTP/3?
These considerations all have an influence on how fast a website loads, as well as which optimizations are possible. For example, a LiteSpeed web server serves more resources faster than NGiNX or Apache, comes with native HTTP/3 support and its own free WordPress plugin (LSCWP) which integrates with the server software.
Website Construction
How a website is constructed can have a big influence on how much optimization can be done. While drag and drop page builders are very popular and have improved tremendously in recent years, some are still better than others in terms of speed optimization. Elementor, while very popular, is very bad at optimizing websites for speed, as it creates an enormous amount of code to enable it to function properly.
Similarly, some themes are better at optimizing for speed than others. My recommended WordPress theme, Enfold, has options to combine and minify all theme CSS and JavaScript, as well as an option to only load resources used on the page. This is much better for loading speed than themes that load resources on all pages, whether they are used or not.
Website Content
Finding someone who is good at both design and programming is very rare. I am talented at many things, including writing and coding. It does not include the art of combining colours and fonts to create something spectacularly beautiful. I willingly leave that to others who are better at it than me.
Unfortunately, the lines between design and coding is so blurred that clients often expect the one to be able to do the other. Page builders are the enablers of this school of thought.
Beauty always comes at a price, and in websites, that price is usually speed. Sometimes the solution is to recreate the same page with correctly scaled images. Other times, it is necessary to sacrifice some elements to gain several seconds in page load speed.
Off-Site Content (Marketing Heaven; Visitor Hell)
I recently sent a proposal for a project on Upwork that included site speed optimization. In short, the client wanted three external marketing tracking scripts added to the site, and the page load speed reduced from 12 seconds to 3 seconds.
Upon investigation, I found that the site was already loading 40 external marketing tracking scripts and 19 stylesheets from 25 domains. Of course, my proposal pointed this out, indicated that 3 seconds was unrealistic without sacrificing some – if not most – of these scripts, but that I was willing to work on optimizing the site within the constraints mentioned. I was not selected for the project.
My experience in PMEL tells me that measuring results is important, but it is equally important to be selective in choosing what to record and measure so that it does not become an onerous process.
The Human Touch
The order in which resources are loaded, and when, can play a role in website loading speed.
While optimizing this website, I knew that Google Tag Manager had to load first, because Google Analytics is injected into the page through it. The sooner Google Tag Manager loaded, the sooner the request to Google Analytics would be made. I also had to move my favicon and webmanifest files to earlier in the queue, because by the time they were loaded (at the end of the page load), the connection to my server would be dropped by the browser, resulting in a new DNS lookup and negotiation for a connection to my domain. By moving them earlier into the queue, they are using a connection that is already open to load into the browser cache for when they are needed at the end of the page load.
This is an analysis that is not possible to automate, as it would vary greatly per website setup.
My WordPress Site Speed Optimization Process
My WordPress site speed optimization process involves all the previous steps to find a solution that works best within the constraints given.
Ideally, I would simply set up a Lightsail instance with LiteSpeed Web Server serving through the Cloudflare CDN, optimized with LSCWP, change the theme to Enfold, remove most scripts, use websafe fonts, minimize image usage and voilà: fast website.
Unfortunately that is not suitable in all instances. Site speed optimization is a process that has to play off many variables to arrive at a solution that serves all interests well. Yes, the client doesn’t want to pay a fortune for the perfect server environment, yes, the design team wants a site that portrays the brand well, yes the marketing department need statistics, and yes, the visitor wants a page that loads fast. These goals are not mutually exclusive.
While site speed optimization looks at the entire website as a whole, page speed optimization should also be done on a page-by-page basis. This means that each time content is published, it should undergo a speed optimization check, as it should undergo an SEO check.
Like SEO, site speed optimization is not a once-off exercise. HTTP/2 with its many speed optimization options only became largely available from web hosting companies in recent years, after 2015, when it became a proposed standard. As of August 2020, HTTP/3 is available but disabled by default in most new versions of browsers and LiteSpeed Web Server is the only web server that natively supports it.
Conclusion
WordPress site speed optimization, when done correctly, is much more than simply installing a plugin and selecting a couple of options.
It is vitally important that clients understand that there will necessarily be trade-offs between cost, function, presentation and speed. Any freelancer who promises results without trade-offs are – quite frankly – deceiving the client.
Certainly, great gains can be made on a fully unoptimized site by simply installing a plugin and selecting some options, but that does not mean that the site is fully optimized or as fast as it could be.