[wp-hackers] Best practices for plugin with complicated settings?

Andrew Nacin wp at andrewnacin.com
Mon Jul 26 07:47:25 UTC 2010

On Mon, Jul 26, 2010 at 3:38 AM, Peter Westwood
<peter.westwood at ftwr.co.uk>wrote:

> On Mon, July 26, 2010 8:11 am, Carl Roett wrote:
> > My team is currently working on the BuddyPress Media plugin
> > http://code.google.com/p/buddypress-media/  (previously known as BP
> > Album+)
> >
> > At present, we have 207 configuration settings consisting of mixed data
> > types (bool, int, string, object) that we're storing to a single WP
> > option.
> > This number is probably going to increase to around 400 settings by the
> > time
> > we're finished. Total stored size in the DB about 4K. The settings rarely
> > change after the admin has completed initial setup.
> >
> My first response to this is - Do you /really/ need that many user
> configurable options.
> Consider making some decisions about how the plugin should work and more
> some of them to only be configurable using filters so that in the rare
> case where someone does need to change one of those settings they still
> can.

I strongly second Peter here. Make decisions, not options. You're building
on top of BuddyPress, so you can offer your own filters and keep many
options out of the UI.

Also, I took a very cursory look at the plugin and noticed you weren't using
the settings API, at least not yet.

More information about the wp-hackers mailing list