Modifying WordPress plugins

I have what is likely a very simple question about making changes to a WordPress plugin. I apologize for the simplicity of my question, as I am very new to working with code that may be open-source and new to plugin development.

I found a plugin that provided a good solution for a project I was working on. However, in order to make it work better for my needs, I modified the code. The plugin has a “GPLv2 or later” license, which based on this seems to say that modifications to the plugin are fine, so long as I note any changes I’ve made and that I publish the plugin under the “GPLv2 or later” license too.

Because of the modifications I’ve made to the plugin, I would like to be able to provide it to others as a part of client work. However, I’m not sure of the best way to move forward.

Would it be better to publish the plugin with a “GPLv2 or later” license and update it myself (I’ve made very minor changes to the plugin)?

Or would it be better for me to contact the original owner of the plugin in order to collaborate and propose my changes? If the original owner doesn’t accept my changes, what are my options?

To answer @wrydere’s questions:

  1. The plugin is free, not currently offering paid upgrades or generating any sort of profit.
  2. Definitely don’t have the time to maintain my own version of the plugin. It would be nice if I could for clients, but I don’t see that realistically happening. However, if I were to maintain my own fork of the plugin, if the original owner pushes updates, would me accepting those updates (along with my own changes) prompt the WordPress dashboard to constantly tell me to update the plugin (because the code doesn’t “match”)? Basically, I’d want to be able to accept the updates from the owner each time updates are pushed and still keep my changes without WordPress notifying me that I need to “update” the plugin.
  3. For right now, no, I don’t think the behavior needs to be accomplished in a secondary plugin. Could it be? Probably. But most of the heavy-lifting has already been done with this plugin, so creating a new one would be recreating the wheel.

1 Answer
1

In the spirit of open source software, I would definitely start by contacting the original developer. If your changes are an improvement to the codebase, and do not take the functionality of the plugin in a new direction, collaboration may be welcomed.

If your modifications are rejected by the original developer, there are some other things to consider before you move ahead:

  1. Is the plugin that you originally forked a free plugin, or paid? Or is it free but offering paid upgrades (freemium)? If it is revenue-generating in any way, forking it and re-releasing with minor changes is morally questionable.

  2. Do you have the time and bandwidth and desire to maintain a new, forked version of the original plugin? If not, you probably don’t want to release it publicly just to get your very minor changes into other people’s hands. You may be better off just maintaining your own fork of the plugin, for your own projects.

  3. Could the modifications in behavior be accomplished in a secondary plugin? There’s quite a few examples of plugins that require / modify / build upon other plugins. This route requires staying abreast of updates to both WP core and the initial plugin, which can be a headache, but if it is possible to make your changes via hooks, actions, and (safe & sane) overriding of functions from the original plugin, this might be a route to explore.

Sorry for not providing a definitive answer, but the situation could point to many possible outcomes.

Leave a Comment