Wordpress: Uninstall, Configure & Edit plugins
My proposal is to help integrate plugins more tightly and consistently with the addition of ‘uninstall’ and ‘configure’ actions in the “Plugin Management” and by enhancing the plugin editor’s capabilities by allowing editing of all plugin files.
== Summary ==
Obviously my proposal would only work if it was used within the WP core as it would need plugin developers to work with the provided hooks. The hooks would need to be well documented and the code should remain simple and very robust.
I have noted these features are well requested and would really help improve WordPress and there has been a good patch already submitted, as shown, for plugin uninstall. I hope to improve upon this and implement a configure hook that matches it as I think the two features go hand in hand.
The edit link has been debated as to whether it is necessary since you want to discourage editing of plugins, nonetheless for people who know what they are doing it is a useful feature. Being able to edit all the files within the plugin would just extend this ‘usefulness’.
== Milestones ==
My first milestone would be to get the uninstall feature fully implemented, which I would hope to do within the first month.
My second milestone would be the config feature which I would give another month.
By the end of the first two months I would also hope to have completed the design for showing these two options from within the plugin admin.
Then the final month I would check for bugs and generally make sure it all runs smoothly.
The edit feature is a kind of extension which I would implement if the first two milestones go very smoothly and I’m running ahead of schedule.
Presentation
If I were to add my ‘uninstall’ and ‘configure’ hooks there would then be 4 actions in the plugin management:
De/activate |Config | Edit | Uninstall
If I was to implement both of these it would start to look a little overcrowded and may need “Config | Edit | Uninstall” to be listed in a dropdown box or simply hidden by a more button that uses jquery to reveal the other options in some way but this would need to degrade gracefully.
I would also need to decide if the uninstall link would only show for the plugins who are using the hook, or for all of them but grayed out for those not using it. There would also need to be a way to show that the plugin has been uninstalled (the link could become grayed out, but once the plugin is reactivated would need to revert to being clickable).
== Uninstall ==
Topic #1108, Trac #5625, http://weblogtoolscollection.com/archives/2008/01/07/uninstall-is-there-such-a-thing/
This would:
* The interface should show a confirmation beforehand, to avoid accidental data loss.
* Run uninstall code written by the plugin author to remove superfluous entries in the user’s DB. (and/or any other files that can be cleaned up). Options and DB tables can be passed to the hook to handle, but it is also possible to call custom cleanup code written by the author.
* Then display ‘uninstall success’ confirmation and further info, also provided by author, on any other code that needs to be manually removed eg. from the template that the user has added (and may have forgotten about).
== Configure ==
Topic #166, Trac #4498
This would:
* Give authors a ‘config’ hook to show their plugin’s config settings in the centralised “Plugin Settings” menu.
Centralising the configuration of plugins would help standardise plugin settings. It would make it easier for users to adjust plugin settings, as they would all be in one place and would avoid cramming the settings menu of the WP admin with an extra tab for each plugin that has settings.
I would add an extra submenu tab linking to settings. In this page all the plugins would be listed down the right hand side (as in the plugin editor) with the settings for the selected plugin shown in the main column. The config link from the plugin management would link directly to that plugin’s own settings (similar to the edit link for plugins).
== Edit ==
I would like to extend the functionality of the plugin editor by allowing editing of all plugin files (php, js, css, etc), not just the main one.
This would be achieved by either adding a nested list below the selected plugin in the right hand “Plugin Files” menu showing the plugin’s other editable files. If the plugin uses subdirectories these files would be shown within the subdirectories (eg a css and a js folder). Only specific file types would be shown (php, js, css, etc – as you can’t edit image files here)
== About Me ==
I have long had an interest in WordPress and recently become more active in the WP community, mostly as developer of the plugin ‘pageMash’; which I have thoroughly enjoyed developing. I received a lot of great feedback including topic #161869, blog posts such as http://blueprintds.com/2008/03/12/organizing-pages-in-wordpress/, and have been listed in a top 10 WP CMS plugins.
I’m 18 years old and have been in web design and development for about 5 years now but have enjoyed programming ever since primary school. I do some web design work for local businesses; such as easyturn.co.uk and also contract out to a local web design company. I am experienced with coding standards and enjoy working with other developers. I attend College in the UK studying maths, physics and economics and have been accepted to study computer science at university next year.
GSoC — April 7th, 2008


