*/ public static function moduleLabels(): array { return [ 'files' => [ 'label' => __('File trace', 'sitetus'), 'description' => __('Sensitive file dates and sizes, executable files in upload folders, changed PHP files, web-shell signatures. File names only, never contents.', 'sitetus'), ], 'archives' => [ 'label' => __('Archive scan', 'sitetus'), 'description' => __('Forgotten backup archives and database dumps in the web root (names and sizes).', 'sitetus'), ], 'permissions' => [ 'label' => __('Permissions', 'sitetus'), 'description' => __('World-writable folders and files under the site root.', 'sitetus'), ], 'bot_traffic' => [ 'label' => __('AI bot traffic', 'sitetus'), 'description' => __('Counts per documented AI crawler from the newest access log (last 20 MB). No IP address, URL or user-agent string leaves the server.', 'sitetus'), ], 'seo_plugin' => [ 'label' => __('SEO plugin records', 'sitetus'), 'description' => __('Reads the active SEO plugin\'s own records (Yoast SEO, Rank Math, All in One SEO): how many published items are set to noindex per post type, post types closed to indexing, orphaned content, whether the plugin\'s sitemap and organization settings are filled. Counts and yes/no only; no title, URL or author leaves the server.', 'sitetus'), ], 'mail_delivery' => [ 'label' => __('E-mail delivery', 'sitetus'), 'description' => __('Reads how site e-mail leaves the server (PHP mail, SMTP or a provider API) from the active delivery plugin\'s settings (WP Mail SMTP, FluentSMTP) and counts sent and failed messages of the last seven days from its log. Transport class and counts only; no address, host, key or subject leaves the server.', 'sitetus'), ], 'cache_posture' => [ 'label' => __('Cache posture', 'sitetus'), 'description' => __('Which page-cache plugins are active at once, whether the leading one has its page cache switched on, and which plugin owns the advanced-cache.php and object-cache.php drop-ins. Plugin slugs and yes/no only.', 'sitetus'), ], 'security_plugin' => [ 'label' => __('Security plugin records', 'sitetus'), 'description' => __('Reads the active security plugins\' own records (Wordfence, Kadence Security, All-In-One Security, Really Simple Security, Limit Login Attempts Reloaded, Two Factor): open scanner findings and last scan age, firewall mode, how many administrators use two-factor, hardening switches, failed-login counters, and whether several firewalls or login limiters run at once. Counts, yes/no and mode names only; no IP address, user name, file path or key leaves the server.', 'sitetus'), ], 'core_integrity' => [ 'label' => __('Core file integrity', 'sitetus'), 'description' => __('Compares the WordPress core files with the official checksum list of the installed version: changed files, missing files and PHP files in wp-admin and wp-includes that are not part of the release. To get the list, this site asks the WordPress update server (api.wordpress.org) each time the module runs. The request carries the WordPress version and the language package and, like every request WordPress makes, the standard WordPress header with the version and the site address. The panel receives counts and file names only; no file contents leave the server and no file is repaired, replaced or deleted.', 'sitetus'), ], ]; } private static function requireCapability(): void { if (! current_user_can(self::CAPABILITY)) { wp_die(esc_html__('You do not have permission to manage this page.', 'sitetus'), '', ['response' => 403]); } } /** * @param array $posted * @return array */ private static function knownModules(array $posted): array { return array_values(array_filter($posted, static function ($module): bool { return is_string($module) && in_array($module, Settings::MODULES, true); })); } private static function back(string $notice): void { wp_safe_redirect(add_query_arg(['page' => self::SLUG, 'sitetus' => $notice], admin_url('options-general.php'))); exit; } }