get_post_types(['public'=>true]),'post_status'=>'publish','posts_per_page'=>$limit,'paged'=>$page,'orderby'=>'ID','order'=>'ASC','suppress_filters'=>false,'no_found_rows'=>true,'ignore_sticky_posts'=>true]);} static function data(){ $cached=get_transient('mpseo_statistics_summary_v001'); if(is_array($cached))return $cached; // phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching -- plugin custom table or aggregate query with no core API equivalent; values prepared; admin/maintenance query whose result must be fresh. global $wpdb;$scores_total=0;$count=0;$optimized=0;$noindex=0;$missing_desc=0;$missing_kw=0;for($page=1;$page<=10000;$page++){ $posts=self::posts($page,200);if(!$posts)break;foreach($posts as $p){$t=get_post_meta($p->ID,MPSEO_Meta::T,true)?:$p->post_title;$d=get_post_meta($p->ID,MPSEO_Meta::D,true);$k=get_post_meta($p->ID,MPSEO_Meta::K,true);$s=MPSEO_Meta::score($p,$k,$d,$t);$scores_total+=$s;$count++;if($s>=70)$optimized++;if(get_post_meta($p->ID,MPSEO_Meta::N,true)==='1')$noindex++;if(!$d)$missing_desc++;if(!$k)$missing_kw++;}if(count($posts)<200)break;}$result=['posts'=>$count,'avg'=>$count?(int)round($scores_total/$count):0,'optimized'=>$optimized,'noindex'=>$noindex,'missing_desc'=>$missing_desc,'missing_kw'=>$missing_kw,'redirects'=>(int)$wpdb->get_var($wpdb->prepare('SELECT COUNT(*) FROM %i',$wpdb->prefix.'mpseo_redirects')),'errors404'=>(int)$wpdb->get_var($wpdb->prepare('SELECT COALESCE(SUM(hits),0) FROM %i',$wpdb->prefix.'mpseo_404'))];set_transient('mpseo_statistics_summary_v001',$result,10*MINUTE_IN_SECONDS);return $result;} static function ajax_refresh(){check_ajax_referer('mpseo','nonce');if(!MPSEO_Access::can(MPSEO_Access::CAP_MANAGE))wp_send_json_error(__('Access denied', 'multipify-seo-boost'));delete_transient('mpseo_statistics_summary_v001');wp_send_json_success(self::data());} static function page(){$d=self::data();$v=MPSEO_V72_Analytics_UI::snapshot(8);echo ('
' . esc_html__('Summary view of local SEO quality and the available Google data.', 'multipify-seo-boost') . '
' . esc_html__('Scores are calculated on content analyzed by Multipify. Google data is only available if Search Console is connected. Start with missing metadata and editorial priorities.', 'multipify-seo-boost') . '
' . esc_html__('Instant view of your content quality.', 'multipify-seo-boost') . '
' . esc_html__('Start with the least optimized content.', 'multipify-seo-boost') . '
' . esc_html__('Clicks, impressions, CTR, position, queries and pages.', 'multipify-seo-boost') . '