Sometime, a plugin code grows to a point where you need to split functionalities into smaller parts. Then users can choose to activate all the parts, or just the ones they need.
For example, WPML provide a whole bunch of plugins that aims to translate different parts of your site: Pages and Posts, Media, Strings, Professional Translation Management ... But those plugins depends on each other. Another example is WordPress SEO by Yoast. There is the main SEO plugin, a Video SEO companion plugin and a Local SEO plugin. Video and Local SEO both need the main SEO plugin to work.
The idea is to provide a mechanism to ship several sub-plugins into one main plugin. The main plugin would have the task to see if subplugins are installed, to verify dependencies and upgrades availability and to load (with require
) the subplugin php files if they are activated. Updating a subplugin should not be possible without updating the main one. This would allow plugins author to easily avoid loading a big amount of php files if the user only use a small part of the plugin. Subplugins code could be located in a subdirectory of the main plugin, but still appear in the Plugin management screen.
That would be different from Child Plugin (http://wordpress.org/ideas/topic/child-plugins) as the main plugin should be aware of the subplugins existence.
I tried to implement a very simple version of this idea in my Media Helpers plugin (http://wordpress.org/plugins/media-helpers/). This plugin is a collection of small scripts that enhance the Media experience. Each script can be enabled independently and it's file is loaded by the main plugin only if needed. The subplugins files has been written as if they were a standalone plugin.