$data) { $pluginsInstalled[] = [ 'name' => $data['Name'] ?? $file, 'slug' => dirname($file) === '.' ? basename($file, '.php') : dirname($file), 'version' => $data['Version'] ?? '', 'file' => $file, ]; } $themesInstalled = []; foreach ($themes as $slug => $theme) { $themesInstalled[] = [ 'name' => method_exists($theme, 'get') ? (string) $theme->get('Name') : (string) $slug, 'slug' => (string) $slug, 'version' => method_exists($theme, 'get') ? (string) $theme->get('Version') : '', ]; } $details = [ 'plugins_installed' => $pluginsInstalled, 'themes_installed' => $themesInstalled, 'correlation_source' => 'backend', ]; return new CheckResult( 'plugin_vulnerability', 'info', 0, 0, 'info', $details, '' ); } catch (\Throwable $e) { return new CheckResult( 'plugin_vulnerability', 'info', 0, 0, 'info', ['error' => $e->getMessage()], '' ); } } }