site_summary(); $gaps = ( new AEOMATIC_Citation_Gaps() )->site_summary(); $bot_summary = AEOMATIC_Crawler_Log::get_summary(); $retention = AEOMATIC_Crawler_Log::get_retention_summary(); $score = (int) ( $audit['average'] ?? 0 ); $scanned_count = (int) ( $audit['count'] ?? 0 ); $posts_with_gap = (int) ( $gaps['with_gaps'] ?? 0 ); $clean_count = (int) ( $gaps['clean'] ?? 0 ); $dashboard_url = admin_url( 'admin.php?page=' . AEOMATIC_Admin::MENU_SLUG ); $gaps_url = admin_url( 'admin.php?page=' . AEOMATIC_Admin::SLUG_GAPS ); $activity_url = admin_url( 'admin.php?page=' . AEOMATIC_Admin::SLUG_ACTIVITY ); $settings_url = admin_url( 'admin.php?page=' . AEOMATIC_Admin::SLUG_SETTINGS ); $score_color = $score >= 70 ? '#1d9e75' : ( $score >= 40 ? '#ba7517' : '#a32d2d' ); $score_label = $score >= 70 ? __( 'Great', 'aeomatic' ) : ( $score >= 40 ? __( 'Needs work', 'aeomatic' ) : __( 'At risk', 'aeomatic' ) ); // Top 3 bots — small horizontal bars, scaled to the busiest bot so // the shape reads at a glance regardless of absolute traffic. $top_bots = array_slice( $bot_summary, 0, 3, true ); $max_bot = $top_bots ? max( $top_bots ) : 0; $total_visits = array_sum( $bot_summary ); $kept_entries = (int) ( $retention['kept'] ?? 0 ); $purged_last = (int) ( $retention['purged_last'] ?? 0 ); $retention_days = (int) ( $retention['retention_days'] ?? 90 ); ?>