[wp-trac] [WordPress Trac] #6503: Random plugin structure should be
deprecated
WordPress Trac
wp-trac at lists.automattic.com
Mon Mar 31 15:38:09 GMT 2008
#6503: Random plugin structure should be deprecated
-----------------------------+----------------------------------------------
Reporter: robertaccettura | Owner: anonymous
Type: defect | Status: new
Priority: normal | Milestone:
Component: General | Version:
Severity: minor | Keywords: plugin, directory, update
-----------------------------+----------------------------------------------
== Current State ==
Plugins are currently a bit of a mess. They generally fall into a few
categories:
1. A single file. often wp-name.php
2. A handful of files.
3. A directory full of files, and perhaps a few subdirectories within
that.
There are several problems here:
'''Namespace Collisions''' - each plugin potentially violates each other's
namespace if they don't use unique filenames. A good example of this is
readme's. Most are lost unless you rename them. Potential for worse
exists with common names "feed", "comment", etc.
'''Management''' - uninstall isn't always easy since associated files
aren't always clearly named. This leaves potential files on the
filesystem, and could be a potential security issues.
'''Upgrades''' - I've already had one case where I didn't upload a plugin
to the ideal location, and the one click update functionality failed.
== Suggestion ==
All plugins should have a parent directory. For example:
/wp-content/plugins/wp-mobile/wp-mobile.php
/wp-content/plugins/wp-mobile/README.txt
/wp-content/plugins/wp-super-cache/Changelog.txt
/wp-content/plugins/wp-super-cache/plugins
/wp-content/plugins/wp-super-cache/readme.txt
/wp-content/plugins/wp-super-cache/wp-cache-base.php
/wp-content/plugins/wp-super-cache/wp-cache-config-sample.php
/wp-content/plugins/wp-super-cache/wp-cache-phase1.php
/wp-content/plugins/wp-super-cache/wp-cache-phase2.php
/wp-content/plugins/wp-super-cache/wp-cache.php
By doing this, the entire thing is simplified. All plugins can then be
easily upgraded by replacing the directory, removed by removing the
directory, etc. Many plugins already do this on their own (such as wp-
cache).
My suggestion is that this methodology be encouraged, and eventually the
old method of php's in the plugins directory require opt-in via a constant
in wp-config.php perhaps in the 2.7 timeframe.
This would remedy the above problems and provide a much cleaner plugins
directory that's easier to manage.
--
Ticket URL: <http://trac.wordpress.org/ticket/6503>
WordPress Trac <http://trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list