I’m considering the saving of options for a plugin I’m developing. The first obvious candidate is the wp_options table.
While reading the Pro WP Plugin Development book I came across this:
Every option saved adds a new record in WordPress ’ option table. You can simply store several
options at once, in one array: This avoids cluttering the database and updates the values in one single MySQL query for greater efficiency and speed.
On the other hand, I also imagine that if the plugin has a lot of settings it may hinder performance to store everything in one array. Would it therefore make sense to split options into separate records in such cases?
Third option I can think of is to create custom tables to store the plugin settings, as I’ve seen some plugins do this as well.
What are the rules/guidelines to decide which way to go?