Wordpress - Proper Way to Modify Plugin
The "right" way obviously depends on the plugin. Some plugins are easier to edit than others, but most plugins can actually be modified by other plugins.
For example, if a plugin has a function hooked into WordPress with an action, then it's a simple matter for you to make another plugin that unhooks that function with remove_action, and then adds your replacement function in instead. This sort of method will let you replace individual functions in plugins with your own modified versions, without modifying the original plugin.
Same concept works with filters, obviously.
IMHO, the best approach is either to fork the Plugin to maintain your changes, or else submit patches to the Plugin developer, to have your changes made a part of the original Plugin.
Creating a "Child Plugin" really isn't easy. The "Child Theme" concept really applies to the template files that get used, moreso than the Theme functions (and in fact, the functions.php
file from both Parent and Child get loaded, which does cause problems for improperly coded functions.php
files in either the Child or Parent Theme).
The best way would be to just clone it and change the Plugin Name in the header and change the directory name. This way you could also have the original installed but not activated so you will still get alerts when updates are released.
<?php
/*
Plugin Name: Name Of The Plugin
Plugin URI: http://URI_Of_Page_Describing_Plugin_and_Updates
Description: A brief description of the Plugin.
Version: The Plugin's Version Number, e.g.: 1.0
Author: Name Of The Plugin Author
Author URI: http://URI_Of_The_Plugin_Author
License: A "Slug" license name e.g. GPL2
*/
?>