use reflection to extract the fields from PluginGlobals struct