It’s highly recommended not to include the plugin directly inside a WordPress theme or plugin. Including the plugin inside a theme or plugin can lead to potential problems such as:
- The plugin is already installed on website
- Maybe the plugin is included in another plugin. In this case we can’t be sure which version of the plugin is used and that can makes website broken (see this discussion)
To avoid these problems, I recommend using TGM Activation Class to tell users that your theme needs the Meta Box plugin to run properly. This class is easy to use and configure (just follow the instruction at its homepage – it’s simply copy and paste with small changes such as plugin name and slug).
This is the sample code that I use in Glamo theme:
To see more examples of using Meta Box inside a WordPress theme using TGM Activation Class, please take a look at my premium themes.