Site performance is one of the leading user engagement and retention factors for WordPress sites. Anything over a three-second load time is considered inefficient, and you could be losing readership and customers because of it. Unless your WordPress blog is completely customized including plugins, you probably have a few third-party plugins that could be causing your site to be sluggish.
Any third-party code allowed to run on your web server can have an adverse effect on your load times. We showed you how to test your site for performance issues, and in this post we’ll help you weed out WordPress plugins that could potentially harm your performance.
First, Let’s Eliminate Some Myths
There are plenty of myths around PHP, WordPress and plugins. The first one is that each time you add a plugin, you hurt your performance. It’s not the number of plugins that causes an issue. It’s the way the plugins are written. A well written PHP plugin will perform smoothly. A poorly coded plugin will hurt your site’s performance and its security. You can have 1,000 well-written, streamlined plugins installed and your site will run fine. Just one poorly coded plugin makes a difference.
You don’t know if a plugin is coded well unless you’re familiar with PHP, the WordPress API and efficient code. You can install each of your plugins and test its performance using Google’s PageSpeed Insights.
Another common myth is that WordPress can’t scale and is only for small blogs. While that might have been true years ago, it’s not true at all anymore. WordPress scales well for sites that have a vast readership as long as you follow performance best practices and host the site on a CDN.
Finally, even popular plugins with thousands of downloads have errors. Always keep your plugins up-to-date with the latest patches. This will fix any major security and sluggishness issues. If you find a popular plugin is a main performance problem, it’s time to find an alternative or even have a developer customize one of your own.
Plugins with Heavy Amounts of Database Queries
Writing efficient, streamlined SQL queries is an art form. You can have the best PHP coders in the world, but this doesn’t mean that their SQL construction is the best for database performance. In most cases, you need a database expert to analyze database queries to ensure efficiency. Also, table design and indexing makes a huge difference in performance.
Most plugins must query WordPress tables at some point. If you download a plugin that relies on several database queries, you should take a look at the SQL code. It might not make much of a difference if your site has little traffic, but once your site gains some traction, poor SQL can have a tremendous effect on performance.
If you think SQL query performance is an issue, try Query Monitor.
Remote Calls or “Bandwidth Leeching”
Some developers pull code, images or files from other sites without ever pulling those resources to the local directory. Every time the plugin must make the call to another web server, you put your performance in the hands of another server administrator. It’s common to keep some resources in the cloud such as CSS and JS files, but pulling assets such as images off of other servers is called bandwidth leeching and it’s frowned upon among the webmaster community.
If you find that your plugin is making too many remote calls, you can re-code the plugin to pull assets from a local directory after you copy them to your local server. A CDN can also help improve performance of external files when you must include them in your pages.
Including Assets That Aren’t Needed
An easy way to identify assets that load on a page is to just view the page’s source code in the browser. You probably need to customize the plugin code to ensure that all assets are loaded, but some plugins make the mistake of loading old libraries or loading the same library multiple times. It’s this kind of mistake that can slow down your site and even cause bugs.
Disable Plugins One-by-One
If you’re not sure which plugin is causing performance issues, you can disable each one-by-one. Each time you disable one, run a speed test. This will allow you to identify which plugins are causing slowness issues.
After you identify slow plugins, you can either customize the code or choose an alternative. If you customize the code, you can no longer download updates from the developer. This means that you must maintain changes yourself. Some plugin developers will work with you to customize code, but in most cases it’s easier to use an alternative.
You can also make changes to your overall site to fix performance issues unrelated to plugins. Here are some tips for better performance overall:
- Host your WordPress site on a CDN
- Use a WordPress caching plugin (See our W3TC Integration guide)
- Minimize image size or use compression (plugins are also available for compression)
- Make your site responsive for mobile
- Ensure your theme is well coded and efficient
- Monitor any hotlinking and disable it
- Use penetration tools to check for any vulnerabilities