title: All WordPress options as single option (serialized multidimentional array), or multiple options?
body: <p>I know my way around WordPress, but right now I'm developing a rather big and advanced WordPress plugin.</p>
  
  <p>For this reason I've put a lot of thought into my data structure.</p>
  
  <p>When I was a beginner I always used to save it like this(get_option(prefix_option_name)).
  Then I started using multidimentional arrays, registering 1 for each settings_section and now I typically save all plugin options in 1 big multidimentional array like this: plugin_options[section][option][evt.more subs here][etc]</p>
  
  <p>This does work fine, and I do like the fact that I can just pull all options out one time in the init-hook ($plugin_options = get_option('plugin_options), so I can work with the $options "locally" in the plugin, HOWEVER...</p>
  
  <p>Taking into account that WordPress is already utilizing transients to cache (WP Cache API) the get_option call, <strong>which is better for performance?</strong> Even though my plugin has a lot of options, I guess you could never reach the limit of the longtext type (4gb data or something), even I packed it all in one single serializable multidimentional array? But I want to do what's best from a performance point of view, so in short, here's my question again:</p>
  
  <p><strong>What is best (for a rather big and complex wordpress plugin)?</strong></p>
  
  <ol>
  <li>Saving all your plugin options as a single option (serialized multidimentional array), like eg. name='plugin_options[section][option]' </li>
  <li>Splitting each options tab and options page into it's own options entry like eg: section[option][etc]</li>
  <li>simply just prefixing all your plugin options and putting then as a seperate db entry like eg. pluginname_option_1, pluginname_option_2</li>
  </ol>
  
  <p>I like the "single plugin option" approach, but right now I'm confused as to whether or not fetching/updating 1 big array from the db really is the best way to go, if the array get's REALLY big - like in a very big and advanced plugin.</p>
  
  <p>The problem with 3 as I see it is that with 1, you would only need to fetch all options in one db-call, where in 3 (where you save each option as a db entry for itself), you would have to query the db for each specific and individual option.</p>
  
  <p>But which is better 1 call for all options, 1 for each section or 1 for each individual option (I guess my question could be narrowed down to this in the end :D). Can the serializable "single option" plugin option multi-dimentional array realistically grow too big? Should it be split up?</p>
  
  <p>Look forward to hearing your opinions on this. Cheers. :-)</p>