ActiveDen

WP Dependant Plugins

262 posts
  • Bought between 10 and 49 items
  • Exclusive Author
  • Has been a member for 5-6 years
  • Referred between 50 and 99 users
  • Sold between 10 000 and 50 000 dollars
  • United States
JoeMC says

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?

326 posts
  • Netherlands
  • Sold between 10 000 and 50 000 dollars
  • Repeatedly Helped protect Envato Marketplaces against copyright violations
  • Exclusive Author
  • Bought between 10 and 49 items
  • Referred between 10 and 49 users
  • Has been a member for 2-3 years
RikdeVos says

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.

262 posts
  • Bought between 10 and 49 items
  • Exclusive Author
  • Has been a member for 5-6 years
  • Referred between 50 and 99 users
  • Sold between 10 000 and 50 000 dollars
  • United States
JoeMC says

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.

679 posts
  • Attended a Community Meetup
  • Bought between 50 and 99 items
  • Elite Author
  • Exclusive Author
  • Has been a member for 3-4 years
  • Most Wanted Bounty Winner
  • Referred between 500 and 999 users
+2 more
mordauk says

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.

262 posts
  • Bought between 10 and 49 items
  • Exclusive Author
  • Has been a member for 5-6 years
  • Referred between 50 and 99 users
  • Sold between 10 000 and 50 000 dollars
  • United States
JoeMC says

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.
That’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.
by
by
by
by
by