What are people’s opinions on dependent plugins? I’m currently creating a plugin that will use a bunch of code that my other plugins will also use. So, I was thinking to create a standalone “tools” (name will be different) plugin that people would also have to install in order to use my other plugins… this way there won’t be a bunch of duplicate code throughout multiple plugins.
Does this make sense? And is this an accepted practice?
It’s a nice idea, but not worth the trouble. You’d have to make sure that every version of each of your plugins is compatible with every version of your “tools” plugin. This is a huge amount of work and you’ll wind up wasting a lot of time.
To be honest, I don’t see the problem in copy-pasting functions. It keeps everything nicely organised, especially if you’re writing everything object oriented which I highly recommend.
Thanks! That’s good advice. I currently do not really work with Oop in php (I come from an ActionScript background where I worked with classes a lot, though)... I’ve mainly worked with themes and haven’t had much need yet for, but I definitely see the usefulness for plugins for sure.
- Attended a Community Meetup
- Author was Featured
- Bought between 50 and 99 items
- Exclusive Author
- Has been a member for 3-4 years
- Item was Featured
- Most Wanted Bounty Winner
- Referred between 500 and 999 users
I think a slightly revised method is actually a very good practice. Build the “core” plugin, and then build add-ons for it. I’ve done this with several plugins now and had great success with it. You could also build add-ons for large free plugins, such as the e-commerce plugins.
mordauk saidThat’s the route I was thinking. I have a base package of scripts that includes a custom fields class and different media functions, plus a few other things. I was thinking of uploading this plugin as a freebie to WordPress.org and then my other plugins would use many of the scripts/functions in the base package.
I think a slightly revised method is actually a very good practice. Build the “core” plugin, and then build add-ons for it. I’ve done this with several plugins now and had great success with it. You could also build add-ons for large free plugins, such as the e-commerce plugins.
