Instead of implementing it in the method above we could have a single entry containing form values in a serialized form. This would mean fetching only one value rather than fetching each setting separately.
Refrence : civicrm_setting.name = 'enable_components'