0, 'bots' => 0, 'urls' => 0, 'days' => 7]; $rankifyGeoUrls = $rankifyGeoOn && class_exists('\DaftPlug\Rankify\Features\Geo\CrawlerLog') ? \DaftPlug\Rankify\Features\Geo\CrawlerLog::topUrls(5) : []; $rankifyGeoCache = class_exists('\DaftPlug\Rankify\Features\Geo\CrawlerLog') ? \DaftPlug\Rankify\Features\Geo\CrawlerLog::pageCacheActive() : false; $rankifyBeaconOn = class_exists('\DaftPlug\Rankify\Features\Geo\CrawlerBeacon') && \DaftPlug\Rankify\Features\Geo\CrawlerBeacon::receiving(); $rankifyGeoReferrals = class_exists('\DaftPlug\Rankify\Features\Geo\Referrals') ? \DaftPlug\Rankify\Features\Geo\Referrals::bySource() : []; $rankifyGsc = class_exists('\DaftPlug\Rankify\Features\SearchConsole') && Utils::hasActivePro() ? \DaftPlug\Rankify\Features\SearchConsole::overviewScreen() : ['connected' => false, 'property' => '', 'report' => ['state' => 'disconnected']]; $rankifyGscReport = is_array($rankifyGsc['report'] ?? null) ? $rankifyGsc['report'] : ['state' => 'disconnected']; $rankifyGscSummary = $rankifyGscReport['summary'] ?? []; $rankifyGscHasNumbers = in_array($rankifyGscReport['state'] ?? '', ['ready', 'empty'], true); $rankifyChecks = [ [ 'id' => 'indexing', 'label' => __('Search engine indexing', 'crownify'), 'ok' => $rankifyIsIndexable, 'okText' => __('Crawlers are allowed to index this site.', 'crownify'), 'failText' => __('Reading settings are asking search engines not to index this site.', 'crownify'), 'href' => admin_url('options-reading.php'), ], [ 'id' => 'sitemap', 'label' => __('XML sitemap', 'crownify'), 'ok' => Utils::getSetting('xmlSitemap') === 'on', 'okText' => __('Your sitemap is being served and kept up to date.', 'crownify'), 'failText' => __('No sitemap is published, so new content is found more slowly.', 'crownify'), 'href' => admin_url('admin.php?page=rankify-settings#/sitemaps/'), ], [ 'id' => 'schema', 'label' => __('Schema markup', 'crownify'), 'ok' => Utils::getSetting('schemaMarkup') === 'on', 'okText' => __('Structured data is attached to your pages.', 'crownify'), 'failText' => __('Without structured data your pages cannot qualify for rich results.', 'crownify'), 'href' => admin_url('admin.php?page=rankify-settings#/schema/'), ], [ 'id' => 'social', 'label' => __('Social previews', 'crownify'), 'ok' => Utils::getSetting('openGraph') === 'on', 'okText' => __('Shared links render with your title, description and image.', 'crownify'), 'failText' => __('Shared links will look however each platform decides to guess.', 'crownify'), 'href' => admin_url('admin.php?page=rankify-settings#/social/'), ], [ 'id' => 'organization', 'label' => __('Organization identity', 'crownify'), 'ok' => '' !== (string) Utils::getSetting('schemaSiteLogo'), 'okText' => __('Your logo is attached to your Organization entity.', 'crownify'), 'failText' => __('No logo is set, so your Organization cannot qualify for rich results.', 'crownify'), 'href' => admin_url('admin.php?page=rankify-settings#/schema/'), ], [ 'id' => 'llms', 'label' => __('llms.txt', 'crownify'), 'ok' => Utils::getSetting('llmsTxt') === 'on', 'okText' => __('AI assistants can find a readable map of your site.', 'crownify'), 'failText' => __('AI assistants have no summary index of your site to work from.', 'crownify'), 'href' => admin_url('admin.php?page=rankify-settings#/ai/'), ], ]; $rankifyPassed = count( array_filter($rankifyChecks, function ($rankifyCheck) { return $rankifyCheck['ok']; }), ); /** * Coverage rows. Each is "how many of your pages have this", which is a * different question from the checklist above — those are one-time switches, * these are the state of the actual content. */ $rankifyTotal = max(1, (int) $rankifyAudit['total']); $rankifyCoverage = [ [ 'label' => __('Custom meta descriptions', 'crownify'), 'done' => $rankifyAudit['total'] - $rankifyAudit['missingDescription'], 'hint' => __('Pages without one fall back to the excerpt or the opening of the content.', 'crownify'), ], [ 'label' => __('Custom SEO titles', 'crownify'), 'done' => $rankifyAudit['total'] - $rankifyAudit['missingTitle'], 'hint' => __('Pages without one use the template for their post type, which is usually fine.', 'crownify'), ], [ 'label' => __('Featured images', 'crownify'), 'done' => $rankifyAudit['total'] - $rankifyAudit['missingImage'], 'hint' => __('No image means shared links render as a bare link, with no card.', 'crownify'), ], ]; ?>
['href' => [], 'class' => []]]), '' . esc_html__('Settings → Reading', 'crownify') . ''); ?>