One of the best things about WordPress are plugins. With plugins you can expand WordPress and make it into anything you need it to be. But, each plugin requires time for loading and processing and it takes up additional resources. How much exactly one plugin need?

Measurement Process

For this article I have tested 35 plugins. This includes both free and commercial plugins, big and small plugins and all of them are tested on the admin side and on the website frontend. All tests are done with a single installation, and WordPress 3.3 RC1 was used. Tests are done on the local server with PHP 5.3.8.

Testing exact impact of plugins on WordPress is not easy, since there are two things that happen during the loading process. First part is WordPress loading the plugin (using PHP include function). Second part is done through actions and filters added by plugin to WordPress during loading stage. First part is not to complicated to measure and that is what you have in the table below. Second part is very complicated to measure because it would need tracking of each action or filter executed. This second part is even more complex if you take into account that different actions and filters are executed only on some of the pages or panels.

All measurements are done using GD Press Tools Pro 4.3.1 plugin. Plugin has a tracker class that can be loaded from wp-config.php file to accurately capture snapshots of different loading stages (among other things). To allow capturing plugins snapshots, I made small change to WordPress core files: added snapshot call into loop that loads plugins.

Measurement Results

35 tested plugins are listed in the table below. You can see how much memory each plugin needs during loading, how many SQL queries are run and how many hooks attached to WordPress, as well as the total time needed for this loading stage. All this is done on the admin side (dashboard) and on the frontend (home page).

AdministrationFrontend
PluginMem.SQLTimeHooksMem.SQLTimeHooks
After The Deadline0.1M00.004100.1M00.00510
Akismet0.2M20.006190.1M10.0047
All In One SEO Pack0.7M10.010120.7M10.01212
Antispam Bee0.3M10.00420.2M00.0056
BackupBuddy1.0M10.099300.6M00.0099
BackupWP0.5M00.00790.5M00.0089
bbPress4.0M00.0472163.8M00.061205
Better WordPress Google
XML Sitemaps
0.6M20.010120.7M20.01312
Contact Form 70.5M00.007160.4M00.00816
Dev4Press Updater0.3M20.00750.3M20.0105
Events Manager4.2M10.051603.0M10.04254
gdHeadSpace 40.7M10.013200.7M10.0138
GD Affiliate Center Pro1.1M00.017160.7M00.0139
GD bbPress Attachments0.2M00.00310.2M00.0041
GD Pages Navigator0.5M00.00830.5M00.0093
GD Press Tools Pro2.9M00.032782M00.02738
GD Products Center Pro2.4M00.029282.2M00.03217
GD Star Rating3.8M00.043123.8M00.04714
GD Custom Posts And
Taxonomies Tools Pro
2.8M00.039611.7M00.02723
GD Unit Converter0.5M00.00740.4M00.0104
GravityForms2.9M00.02542.8M00.0304
JetPack0.7M00.00850.7M00.0095
Lightbox Plus0.7M00.01180.7M00.0137
Regenerate Thumbnails0.1M00.00210.1M00.0021
Subscribe21.4M00.01351.4M00.0165
Subscribe to Comments Reloaded0.3M20.005170.3M20.0063
SyntaxHighlighter Evolved0.3M00.00410.3M00.0051
The Google+ plugin1.6M10.032101.6M10.0326
TinyMCE Advanced0.1M00.002130.1M00.00213
W3 Total Cache1.4M00.019460.2M00.00819
WooCommerce3.9M00.0561643.7M00.059148
WordPress Download Monitor1.5M10.03671M10.0337
WordPress SEO by Yoast1.2M40.018210.7M40.01416
WP e-Commerce0.8M10.01250.9M10.0115
YOURLS WordPress to Twitter1.7M00.022601.5M00.02553
Average1.3M0.570.020281.1M0.490.01822
Total45.9M200.70898138.6170.624755

This data can change depending on the page used to do the testing since plugins can loading different things based on the page. But, these numbers are good reference point to see how the loading of plugins affect the WordPress. Also, you can see on average (and total) how much each plugin adds to the WordPress loading. What each row color means:

Colors:Average optimization results
Bad optimization results, must be improved
Not good, should be improved
Good optimization, some space for improvement
Excellent optimization results

I have mentioned the second part of loading that happens after all plugins are loaded, and WordPress runs actions and filters after that. Table below shows the difference between the WordPress with 35 plugins and WordPress with no plugins. Before plugins loader results are same for clean WordPress and WordPress with plugins.

Interesting thing is that you can have all 35 plugins active, and I had some WordPress setups with more than 70 active plugins. But, be ready for the WordPress using much more resources. The more plugins you have active, the more server power is needed. Plugins will have negative impact on website speed. To fix that you must use a caching plugin (W3 Total Cache for caching pages and minify the JS and CSS files) and some sort of server based optimization (eAccelerate or similar extension for PHP).

Clean WordPress will work with 32MB set for PHP to use. You can have less, but some internal operations might need a bit more, so 32MB is safe minimal value. If you have a couple of plugins, 32MB should be enough. If you have more than 10 plugins, at least 64MB is needed. As you can see from this test, for 35 plugins I had here, you need more, and 96MB or 128MB is safe value. Some shared hosting companies will not let you have more than 64MB or 80MB, so you might have issues with many plugins if you are on some restrictive hosting companies. Consult hosting support to make sure you will get enough resources. You can use average values above to get some orientation value for memory needed.

AdministrationFrontend
TestMem.SQLTimeHooksMem.SQLTimeHooks
Clean WP: Before plugins loader13.2M10.14634413.1M10.172307
Clean WP: After plugins loader4.7M320.2361371.0M200.12143
Clean WP: Total loading results17.9M320.38148114.1M210.121350
WP with plugins: After plugins loader23.0M2351.2068939.7M1830.575305
WP with plugins: Total loading results81.3M2552.055222160.2M2001.3541364
Total 35 Plugins Impact63.4M2231.674174046.1M1791.2331014

Optimization Analysis

As you can see in the plugins table on the top, some plugins results are in different colors. Green colors are for plugins with good optimization, red colors are for plugins with bad optimization. Badly optimized plugins are always loading everything on front-end and on admin side and they take a lot of memory. Smaller plugins with less than 0.8MB of memory used are not a big problem and they usually can’t be much optimized considering number of plugin files.

Since most plugins are behaving different on admin side and front-end, they should be taking care of what will be loaded in both cases. Only files that are actually needed should be loaded. This is not always possible, but with little extra work, code can be separated to allow for better loading optimization. Considering how much memory some of the plugins use, it is essential to try and lower required resources. Most WordPress users are on shared hosting servers, and they need plugins that are optimized.

The Bad

Plugins with worst loading stats and worst optimization from this test are: bbPress, GD Star Rating, Subscribe2, The Google+ Plugin, WooCommerce and YOURLS WordPress to Twitter. bbPress should be loading parts of the plugin only when needed, considering that forum is usually separated from normal WP pages. You can have some core parts always loaded, but most things are not needed on every page. My own GD Star Rating is old plugin, and I made some optimizations in some versions, but I need to do more, and GD Star Rating 2.0 will be highly optimized to use resources. The Google+ Plugin loads many libraries that are not needed for the most part, and for a simple plugin that this should be, it uses a lot of memory. I can’t judge quality of WooCommerce plugin, but I couldn’t believe how bad loading for this plugin is, and its main file loads 32 other files always. I have noticed some other things done bad in this plugin only from first few files, but loading is really bad.

Few plugins are a bit better than this, and they have lighter red color: BackupWP, Events Manager, gdHeadSpace4, GD Products Center Pro, GD Unit Converter, GravityForms. BackupWP doesn’t need anything on front end but it still loads things always. Events Manager has some loading optimizations, but I see potential to make it much better. I have modded plugin into gdHeadSpace4 and I didn’t make changes in loading. This plugin doesn’t have big memory footprint, but some changes can be done. My GD Products Center Pro is still in beta, and I plan to finish loading optimization before releasing 1.0 version. Another of my plugin GD Unit Converter is 100% admin side plugin, yet some things are loaded always, and I will improve this soon. GravityForms requires a lot of things on both admin and front end side, but there are some things that can be optimized much better that they are now.

The Good

Contact Form 7 and WP e-Commerce could benefit from some minor changes, but they are good as far as optimization goes. Light green and good optimization is done with: Antispam Bee and BackupBuddy. BackupBuddy would benefit greatly with better main loader file that is now too big. With fragmentation of this file, will help with optimization further.

Best optimized plugins, considering plugin size and features are: GD Affiliate Center Pro, GD Press Tools Pro, GD Custom Posts And Taxonomies Tools Pro, W3 Total Cache, WordPress Download Monitor, WordPress SEO. My 3 Pro plugins all have advanced loaders and modular structure to load things need for admin side or front end. Even the code used for Ajax or saving data is separated and loaded only when needed. W3TC does a great job in loading of different plugin modules and same goes for WordPress SEO by Yoast has loader that loads different files on both sides, minimizing the impact on WordPress.

My GD Press Tools Pro and GD Custom Posts And Taxonomies Tools Pro can replace great many other plugins, and that alone can save you a lot of resources. If you can have 10 plugins and if each one uses 1.3MB on average, that is 13MB, you can replace with GD Press Tools Pro only (and it can replace much more than just 10, maybe 60 or more plugins), that will use only 2.9MB.

Loading used in my plugins

Process of loading for my GD Press Tools Pro plugin is controlled by main plugin file. First, it loads parts of gdr2 shared library (used by all my plugins). Public functions and classes are loaded next (they are used on both admin and front end side). Some parts of internal code are loaded next. Main plugin class is loaded after that, and this class is used to initialize the plugin and load plugin settings. Than, loader checks if its loaded on admin side. If it is, admin core class is loaded as well as some extra functions. And if the plugin is loaded to save settings or through AJAX call, it loads separate settings saving or AJAX classes. This all improves loading on front end side by some 30%. This loading method is changed over time, and I think that it works great right now.

Two plugins I ALWAYS use

I can’t imagine running WordPress website without my GD Press Tools Pro. It is truly ultimate administration plugin, and it does so many things that you simply need on any website: backup, sitemaps, SEO, optimization and integration… Second plugin is W3 Total Cache. Page caching, external files minify and support for CDN are something each website should use to improve website speed.

Cached Pages

If you use W3 Total Cache or some other similar caching plugin, and you have page cache enabled, it is important to know that when cached page is served to a visitor, WordPress (and plugins) are not loaded at all. All these tests are made when there is no page caching active.

Conclusion

As you can see, plugins can have big impact on WordPress. While you can have as many plugins as you like, there are things to consider:

  • Compatibility: the more plugins you have, there is more chance to have some of them causing problems. Always test plugins when adding new plugin, it is rare, but it can happen. I always have local copies of all my websites, and when new things are added, I always test locally before moving to live server.
  • Resources: the more plugins you have, the more server resources will be used. If you are on the shared hosting, I recommend that you review if you really need all plugins you might have already. Test different plugins you can use, because with too many of them active, you can easily hit the limits imposed by your hosting company. My GD Press Tools Pro can do many things, one of them is to measure data like this, and you can see exact impact of a new plugin added on memory, mySQL server or WordPress.
  • Loading Speed: more plugins == less speed. It is very important to use cache plugins to optimize front end loading, to minify external files and use CDN to load external resources.

I hope that other plugin developers will consider the results from this article, and my recommendations to improve loading for own plugins to optimize them so that end users get faster plugins that are not needing too much resources. Lets make plugins even better.

Rating: 3.5. From 1 vote. Show votes.
Please wait...

About the author

MillaN
MillaN
Dev4Press owner and lead developer

Programmer since the age of 12 and now WordPress developer with more than 8 years of WordPress experience, author of more than 100 plugins and more than 20 themes.

89 Comments

  1. Carl Hancock says:

    Something I want to note here.

    Comparing a plugin like Contact Form 7 with Gravity Forms is simply not a valid comparison. The functionality, capabilities and feature set of these 2 plugins is vastly different. Comparing simple plugins which do not contain very much functionality with fully functioning APPLICATIONS in their own right like Gravity Forms, WooCommerce, etc. is like comparing apples and oranges.

    The larger and more complex the application, the more code is involved and the more resources will be used. This isn’t a reflection on how good or bad the application is as far as code quality, it’s simply going to require more server resources.

    I think comparing such a large number of WordPress plugins to one another as far as load time impact and memory utilization is simply an unfair comparison when it comes to the larger, more complex and feature rich plugins.

    The truth is “plugins” like Gravity Forms, WooCommerce, etc. aren’t really just a “plugin”, i’ve said it many times that they are full blown applications that run on top of WordPress just like iPhone and iPad apps run on iOS.

    0
    Be the first one to like this.
    Please wait...
    1. MillaN says:

      Thanks for stopping by Carl. I don’t compare any of these plugins to each other in that regard, table only states facts in memory use and other things, and it is not comparison. Contact Form 7 is not even close to power of Gravity Forms, even if it uses less memory. Gravity Forms is amazing plugin and considering features in it, I don’t expect that it can use 1MB of memory. My GD Press Tools Pro is highly optimized plugin, yet it uses 2.9MB/2MB of memory. But if it was not optimized, GD Press Tools Pro would use around 6MB.

      And that is the point of all this, not how much memory plugin uses, but how much it can use if it was optimized.

      0
      Be the first one to like this.
      Please wait...
  2. We tested both WooCommerce and WPEC. I can’t give a complete breakdown of the performance that we got but I’m 100% certain that your data for WPEC is off.

    There’s no way that it uses just 5 hooks. It uses hundreds. I know that for fact, because we hook to several dozens of them as well.

    Any chance that you didn’t configure the e-commerce functionality or are not using a theme that loads products?

    As far as e-commerce plugins are involved, I think that it’s a wide enough topic to warrant a complete side-by-side analysis of fully loaded e-commerce sites.

    0
    Be the first one to like this.
    Please wait...
    1. MillaN says:

      Yes, it could be using much more, but there are limitation to what I can measure, and some plugins can get better results than they actually deserve. Testing such plugins is a problem, and in the future methodology and format used for testing will change. This is not perfect testing, and considering how plugins are loaded, there is no way to make it 100% accurate.

      0
      Be the first one to like this.
      Please wait...
  3. MoT says:

    These sort of testing results are very much appreciated. I’ve been contemplating whether to put up a forum for a site of mine in the future. In the past I’ve used dedicated forum systems like vBulletin, etc., but I’ve lately looked in bbPress and even SimplePress. I have to say I like the later much more but would appreciate seeing how it stacks up to bbPress. In the early days it was a temptation to load up on plug-ins just because you could. Several crashes later and rebuilt sites and I realize that there is a critical lack of protection against poorly performing or flat out dangerous plugins. You’re not simply running with scissors here but juggling chainsaws!

    0
    Be the first one to like this.
    Please wait...
  4. I would like to see the latest Simple:Press results against bbPress. I have to admit that I’ve switched from bbPress to Simple:Press and so far I’m very pleased.

    0
    Be the first one to like this.
    Please wait...
  5. Carley says:

    I too would be interested in simplepress vs bbpress (although I’m happy to hear you are happy Frank!)

    0
    Be the first one to like this.
    Please wait...
  6. Toby Cryns says:

    MillaN,
    Is this benchmarking visualization a default feature of GD Press Tools? Is it only in the Pro version?

    Thanks!

    0
    Be the first one to like this.
    Please wait...
    1. MillaN says:

      Hi, it is not exactly part of the plugin, but Pro version has two tools used for it: Tracker and Debugger. Tracker can log in many different things and show them in debugger, measure performance, executes queries and all sorts of other things.

      0
      Be the first one to like this.
      Please wait...
  7. I just wonder how much resources the jetpack plugin will use on a WordPress site? The jetpack plugin seems to be heavy with lots of features.

    0
    Be the first one to like this.
    Please wait...
  8. Grate article, I was facing this loading problem and getting suggestions from users very frequently but now i am sure which plugin to use to reduce loading time and server time as well

    0
    Be the first one to like this.
    Please wait...

Comments are closed.