Multiple plugins vs combined one

If it’s exactly the same code, then no – it shouldn’t cause any performance changes…

Why? Because loading a plugin is pretty easy (hence quick) process. It all happens in wp-settings.php and this is the code:

// Load active plugins.
foreach ( wp_get_active_and_valid_plugins() as $plugin ) {
    wp_register_plugin_realpath( $plugin );
    include_once( $plugin );
}
unset( $plugin );

As you can see, it’s just one loop. And wp_get_active_and_valid_plugins is pretty simple to – it just loads on option (active_plugins) and then loops through that array and checks if files exist…

So, no matter how many plugins are there, only one option is loaded from DB and there are no costly operations connected to loading a plugin (unless plugin does something complicated itself).

PS. Of course I assume that the count of these plugins will be reasonable – if you’ll chop that code and end with 1000 plugins, then it can cause some (but still rather minor, mainly during checking for updates, I guess) problems…

Leave a Comment

error code: 523