A couple of weeks ago, I read a post on WPLift “Build A Plugin (Twitter Widget) into your WordPress Theme)” which in turn was inspired by a post on WPCandy from a couple of months ago “How to create your own WordPress functionality plugin”.
The WPCandy post was advocating that theme designers should stop bundling WordPress plugins and other functionality which limits how easily users can switch themes, something which I feel is absolutely a good idea. But that’s not what I want to talk about in this post — I want to focus specifically on the issue raised in the WPLift post — building plugins directly into themes.
The post shows you how to add the DP Twitter Widget into your theme; it’s literally a case of copying a pasting the plugin’s code into your functions.php. In fact it’s so easy that there’s no reason not to build every single widget and plugin you can think of under the sun into your theme, right?
Unfortunately it’s a little more complicated than that and for the rest of this post I’ll set out exactly why that’s the case.
Firstly, the second you build a plugin into your theme, you’re assuming responsibility and are obliged to support the plugin, so if anything breaks in future updates, you’ll need to be able to fix it. Say the plugin used Ben’s timthumb and updating was an absolute necessity, the onus would then be on you to provide the update by offering an entire theme upgrade rather than just a simple plugin update independent of the theme.
Second, what’s the point? The functionality you’re providing already exists and unless you’re significantly changing the plugin, I’m struggling to see the point of just duplicating functionality. Sure, you get to brag about how your theme has thousands upon thousands of built in widgets and it makes everything really fun and it’ll do everything you’ve ever wanted, but by just adding a plugin that already exists into your theme, you’re just adding something I can do already by installing plugins. Plus, I’ll not lose everything in two years when I decide I need to overhaul the look of my site! And hey, there are sites like mine out there which show you how to do things like building a WordPress powered email newsletter without plugins anyway!
I’m not just wagging fingers from the rooftops — this was a mistake I made when I launched my ill fated theme site, WPShift nearly two years ago. At the time having a ton of functionality in a theme was the way to go and we made a decision that we would go down the route of essentially just bundling plugins with the theme.
I’m glad to say this isn’t all the range any more, so please don’t do it, it’s just making a mess in the long run.