n There had been more than one mutual mention of this blog and Freeware Genius, with joint Appnews site on top. Technically Freeware Genius is WordPress-based software blog, very much like mine. But Samer seems to have has family duties and social life (unlike me) and has less time for ironing out technical nuances. :)
As result most of our conversations touch on performance issues, themes and such. Latest theme change over there hadn’t resolved any issues and added few fresh ones. So I offered my help for a little bit of backend cleanup.
Real mess. Blog seemed to be heavy in every department – text, scripts, images and server-side performance.
YSlow showed somewhat grim picture with heavy page weight and mediocre total score:
Heavy sites are no rarity nowadays, but it matters a lot how that weight is distributed and loaded. Long pauses and slow initial loading are efficient turn-offs. And there were plenty of those.
On WordPress side there were over hundred (ouch!) installed plugins in need of major cleanup (nuke whatever isn’t needed).
Suffusion is one of those modern themes, packed full of features and user-friendly options in administration area. It screams awesome. That is until you look under the hood.
Rich functionality came at cost of:
- multiply style sheet files;
- loads of inline CSS (yuck);
- multiply scripts;
- crazy amount of database queries (WP Tuner helped a lot to narrow it down).
Cherry on top that because of frequent updates I couldn’t even touch theme files, any changes to theme are nuked on update. Creating child theme seemed like an overkill, in the end I found an option to hook own PHP file and used that for modifications.
Few days into process new version of theme cleaned up its database performance (and gave me some grief with update).
Blog used WP Super Cache – popular and proven choice, but not my personal favorite. I had recently moved my own blog to W3 Total Cache, latest and greatest in niche. Its features seemed like natural match to what I had to solve so I swapped to it.
Aside from static page cache it took care of:
- page compression and minification;
- combining style sheets and scripts, also with compression, minification and moving scripts to footer;
- caching database queries.
There was usual (it seems) hiccup with minification – files refused to generate. This time it took disabling pretty permalinks options to solve.
- theme scripts were jQuery-dependent, so I made a tweak to load minified version of library from Google CDN;
- theme allowed to drag and minimize sidebar widgets (more scripts and CSS, great) – as useless feature as it gets, I nuked it by removing function that outputs it from theme hook;
- some of images were linked without www part in URL and generated redirects every time;
- changed Google Analytics code to newer asynchronous one;
- favicon was hosted several levels deep and served with wrong content type, moved to site root and fixed type with AddType image/x-icon .ico in .htaccess;
Page Speed noticed missing expiration headers. What they do is inform browser how long is it ok to store stuff before checking it again. Missing (or worse – wrongly setup) headers can cause re-downloading of files more than necessary and slow browsing from page to page.
- still very image heavy, not something that can be easily fixed – will take major styles cleanup and tweaking how post excerpts work;
- one of advertisement networks seems nuts – they load pack of over ten scripts of considerable size, Samer contacted them about better version or something, no results so far;
- VPS hosting used feels sluggish and I was unable to do anything about long (1-1.5s) page generation times, will take some lengthy talks with support to figure such out.
So here is YSlow opinion after tweaks:
Page was only slimmed down by ~25%. But what matters is where those percent are:
- text parts where greatly reduced in size (almost 6x), which means pages show up and render faster;
- scripts were reduced and moved to footer, which means they don’t get in the way of initial page loading.
While actual download times are still flaky, blog now renders page considerably faster which matters a lot for visitors.
Clearly room to improve, but parts that matter did get much needed boost. Still… several year of unchecked growth and it is pretty much impossible to get blog back to slim overnight.