I am writing my first wordpress plugin which inserts a visualization widget inside a post. I am planning to use a shortcode for my plugin. I followed an excellent tutorial about writing shortcodes. But I still have one question in mind. I have many configuration parameters that will be associated with my widget for example size, color, background, type etc. I can think of two way to capture those configurations.
First is to use a simple shortcode such as this:
[my_widget id=1]
And store the rest of the configurations as a record in the database. When I interpret the shortcode, I can make a lookup and retrieve the rest.
The second way is to pack all the configuration parameters inside the shortcode itself.
[my_widget id=1 color="red" size="600x600" type="one" etc etc etc.]
This would make a rather ironically long shortcode but it will not require a database lookup and will also enable users to edit parameters in place.
My question is, which of these two approaches do you recommend for creating shortcodes for plugins?