'forbidden' ), 403 ); } check_ajax_referer( 'edrad_performance_probe', '_wpnonce' ); nocache_headers(); wp_send_json_success( array( 'probe' => 'wordpress_admin_ajax', 'read_only' => true, 'time' => time() ) ); } private static function status() { global $wpdb; $op = function_exists( 'opcache_get_status' ) ? @opcache_get_status( false ) : false; // phpcs:ignore WordPress.PHP.NoSilencedErrors.Discouraged -- OPcache can restrict status and log warnings; report unavailable instead. $op_enabled = is_array( $op ) && ! empty( $op['opcache_enabled'] ); $op_stats = $op_enabled && ! empty( $op['opcache_statistics'] ) ? $op['opcache_statistics'] : array(); $op_memory = $op_enabled && ! empty( $op['memory_usage'] ) ? $op['memory_usage'] : array(); $db_start = microtime( true ); $db_value = $wpdb->get_var( 'SELECT 1' ); // phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery,WordPress.DB.DirectDatabaseQuery.NoCaching -- Intentionally uncached, read-only SELECT 1 measures a live DB round trip; caching would invalidate the diagnostic. $db_ms = ( microtime( true ) - $db_start ) * 1000; $found = false; $cache_start = microtime( true ); wp_cache_get( 'alloptions', 'options', false, $found ); $cache_ms = ( microtime( true ) - $cache_start ) * 1000; return array( 'sapi' => PHP_SAPI, 'php_version' => PHP_VERSION, 'wp_version' => get_bloginfo( 'version' ), 'object_cache' => wp_using_ext_object_cache() ? 'External object-cache drop-in detected' : 'WordPress in-process object cache', 'object_cache_probe_ms' => round( $cache_ms, 3 ), 'object_cache_probe_found' => $found, 'db_read_ms' => '1' === (string) $db_value ? round( $db_ms, 3 ) : null, 'opcache' => $op_enabled ? 'Enabled / status readable' : 'Not enabled or status unavailable', 'opcache_hit_rate' => isset( $op_stats['opcache_hit_rate'] ) ? round( (float) $op_stats['opcache_hit_rate'], 1 ) : null, 'opcache_oom' => isset( $op_stats['oom_restarts'] ) ? absint( $op_stats['oom_restarts'] ) : null, 'opcache_used_mb' => isset( $op_memory['used_memory'] ) ? round( $op_memory['used_memory'] / 1048576, 1 ) : null, 'opcache_free_mb' => isset( $op_memory['free_memory'] ) ? round( $op_memory['free_memory'] / 1048576, 1 ) : null, ); } public static function render() { if ( ! current_user_can( 'manage_options' ) ) { wp_die( esc_html__( 'Access denied.', 'error-division-radar' ) ); } $status = self::status(); ?>

Performance Intelligence

PERFORMANCE INTELLIGENCE / READ-ONLY

EXECUTION PATH ANALYSIS

Separate browser-observed request latency from server-side micro-probes. No tuning or configuration changes are made.

DIAGNOSTICLOCAL ONLY

Runtime & Cache Intelligence

$value ) : ?>

Cache detection does not identify Redis reliably. Use host diagnostics for the actual Redis backend, PHP-FPM workers, and OPcache capacity.

Browser Latency Probe

Three same-origin samples per target. Static file and WordPress admin-ajax are tested separately. These are browser-observed TTFB and round-trip times, not isolated PHP-only measurements.

No network probes performed.

Results vary with the browser, transport, caches, and network. Admin AJAX loads WordPress; it is not a PHP-only baseline. No public endpoint is created.

Diagnostic Decision Path

High static TTFB: investigate transport, origin/network, CDN and edge caching before blaming PHP.

Fast static, slow WordPress AJAX: investigate WordPress bootstrap, plugins, PHP workers, database and cache with independent server measurements.

OPcache disabled / OOM restarts: review the actual PHP runtime (CGI, FPM, etc.) and OPcache capacity. Do not assume switching to FPM fixes every slow site.

Not measured: genuine PHP-only TTFB, server queue time, PHP-FPM worker saturation, Redis network latency and external visitor performance require separate instrumented host checks.