Currently Moodle modules (upgrade_activity_modules) have support for reading initial configuration values from a defaults.php file. This enables all those configurations to be set, so we can save a bunch of isset() checks here and there.
But there isn't any similar system for all the plugins within moodle (upgrade_plugins). Currently a lot of plugins... are performing queries to DB per request, just to know if one configuration setting has been set or no. Perhaps it would be a good idea to use a similar approach than the used for modules.
I've attached one patch for HEAD. It's really simple (and does nothing in its current form!!).
The only thing to decide in the patch, in order to have it working is "WHERE" are plugin configuration variables going to be stored. There are two alternatives: the main config table (loaded entirely by request), or the specialised config_plugins one (not loaded by default at all).
I think we should use the plugins one (after all, we are using plugins) and in the long term it will make the main config one smaller and lighter... but I really don't know how other plugins are using those tables.
Also... someway related... perhaps it could be a good idea to create one static cache by plugin and name in get_config(), reseting/updating it in set_config() of course.
Your decission... ciao