Since I haven’t concerned myself with the speed of the web sites I was creating so far, I figured it’s time I fixed things up on that front. I chose two of my sites – this one (MyCy), and Silo-tehnika.hr, a little professional site I created.
Neither sites had much need for speed so to speak; MyCy is just a toy and Silo-tehnika.hr is an information dense site the users will tolerate if slow since they need the information. While this is a bit of a lame excuse for a slower site, the owner refused to have .pdf content converted to .html, so it was limited in that sense.
#0 Measuring Speed
In order to improve, first I needed to find a way to measure and compare the speed of these sites. There are many speed/performance measuring tools so it came down to simply picking a couple; and I chose pingdom.com and GTmetrix.
Silo-tehnika.hr had a rather horrible initial score. The performance grade was 66 (D) at average page size of 3.5 Mb and 3.22 load time.
MyCy fared by far better with a 66% (D) performance grade at average page size of 5.5 Mb and 5.24 load time.
At this point I was convinced there was very little to do for Silo-tehnika.hr site because of it’s nature: it’s an image and .pdf heavy product show-off site for an engineering firm. It’s biggest plight are old, scanned pictures I was unable to properly shrink without huge losses, so they remained clunky. It’s second problem is an in-page .pdf display with is sort of necessary at this point because the clients aren’t entirely computer literate and relying on them to download .pdf documents from links is problematic.
MyCy unexpectedly scored THAT badly, because it’s a simple blog with simple content. But, I’m rather careless with what I put up there and I don’t really bother to optimize pictures and stuff on it, I just shove stuff in.
#1 Image compression
Just by using common sense, I figured most upload time would be spent on uploading images, as they’re the single biggest thing in my web sites. So after a little research, I downloaded and installed Smush Image plugin by WPUDEV and used it on both sites.
With Silo-tehnika.hr I was mindful and backed up all of my images prior to running the compression. The free version requires you to click resume every 50 pics: ok, I can live with that. It takes a while, tho.
Silo-tehnika.hr was a tad disappointing; my page size went down from 3.5 to 3.4 Mb, but load time was reduced to 2.84 from 3.22 s.
MyCy page size went down only a tad too, from 5.5 to 5.4, but the load time was reduced from 5.24 to the whooping 2.86 s! gtmetrix upped the PageSpeed score from 23 to 31%, while YSlow remained at 46%.
#2 Caching and file compression
The next step I figured I’d try was boosting my browser caching, minification and file compression props. So what does this even mean?
Since I didn’t want to go in-depth and do this stuff manually, I opped for the Hummingbird plugin.
Hummingbird does it’s own performance test and guides where to improve.
For Silo-tehnika.hr enabling the .gzip compression yielded impressive results! The load time went up only a little bit (from 2.84 to 2.83 s), average page size dropped from 3.4 to 2.7 Mb, and gtmetrix gave PageSpeed score of 72% instead of previous 23%. YSlow went from 46% to 60%! Awesome.
Next thing I went to do is to enable chaching. This resulted in a huge improvement, upping it’s performance grade to 73 from 66. Page size dropped to 2.6 Mb, but load time went down from 2.83 to the whopping 1.67 and gtmetrix gave it PageSPeed of 75% while YSlow remained at 60%.
Next, I used Hummingbird to remove URL Query strings from my assets, and hit the first bump. The performance grade plummeted back to 66%, page size grew to 2.7 Mb and Load time upped to the whooping 2.99 seconds resulting in a PageSpeed score of 71%. Obviously, this was a bad idea here so I turned it off.
For MyCy, I was confused to find that image compression scored 45/100 see as I just used the Smush Images plug in on it. I bumped reGenerate Thumbnails (which was previously operational on Silo-tehnika.hr). The performance grade remained at 66%, but page size went down to 4.2 from 5.4 Mb and Load time went down to 2.04 from 2.86! PageSpeed and Yslow remained at 31% and 46% respectively.
Going back to Hummingbird, enabling the .gzip compression yielded load time decrease to 1.92 s, average page size dropped to 3.4 Mb and gtmetrix gave PageSpeed score of 43%. YSlow went to 56%!
So I suppose common sense wasn’t really so sensible: I got much more bang for my buck compressing the scripts and the code than the actual images.
Activation of browser chaching led to the first failure: apparently one of my plugins is already running page caching.
#3 Browser Chaching and Lazy Load
Apparently Hummingbird handles these well enough.
#4 Database Optimisation
Moving on, I opted for WP-Optimize plugin to optimize and clear out extra junk from my database. The plug-in works manually and takes a bit of time to finish. There is a scheduled clean-up Beta feature which I set to Monthly on MyCy.
All results remained the same, but it’s a decent thing to have up.
So far, here are the results I got: