In our second Speed Week post we will be covering how plugins and bloated databases can adversely effect your websites performance. In this article we will cover ways you can benchmark and monitor plugin performance and remove excess bloat from your WordPress databases.
Plugins are a great way to customise your website and add additional features, but every plugin you install comes at the cost of using a percentage of your available resources. As a general rule of thumb you should keep plugins to a minimum so that you can maximise performance, but what if you have no choice but to install a whole heap of plugins? Well, that is where performance profiling comes in…
As is often the case with plugins, there are generally similar versions and functions available from multiple developers and some plugins perform better than others. A great way to see how your plugins are performing and how they effect your websites load times can be accomplished by installing the P3 (Plugin performance profiler) plugin.
And no, the the irony of using a plugin to benchmark other plugins has not been lost on me, but this is a powerful tool that will allow you to profile the performance of any plugin installed on your website and see who is the culprit of any performance losses.
A database is responsible for neatly storing all of the website data and configuration settings for your website. Much like how that spare room in your house or that drawer you keep all of your odds and ends in, becomes cluttered over time making it more of a chore to find what you need, a database can be effected in the same way making a simple lookup or query for information take longer than it should.
Database bloat is natural and it accumulates gradually over time with items like deleted comments or posts that are still in the trash, multiple page revisions and even drafts of posts and pages long since forgotten. And since a database table is read from top to bottom like the text on a page, the more information you add to a table, the longer it takes to locate the information, especially if what you are trying to find is towards the end of a massive table.
As is the case with profiling plugins, the best way to trim the fat from your database is by installing a plugin tailored for that job. Two great plugins that will help you achieve slimmer and faster database are WP-Optimize and WP-Sweep and they are designed to be easy to use by website admins who have zero knowledge of databases.
But I must warn you, and I can’t stress this enough… Backup your database before any major updates or running a database cleanup. If you are unfamiliar with how to achieve this, contact your web host and have them explain how to perform a backup or have them perform one for you.