# thinkrank/1.26.0/includes/abilities/analysis/class-run-seo-analyzer.php

ThinkRank AI SEO – AI SEO Plugin for WordPress: Schema, XML Sitemaps, Meta Tags, Search Console &amp; Local SEO, version 1.26.0. 63 lines.

- Page: https://pluginprobe.com/plugins/thinkrank/1.26.0/code/includes/abilities/analysis/class-run-seo-analyzer.php
- Raw: https://pluginprobe.com/plugins/thinkrank/1.26.0/raw/includes/abilities/analysis/class-run-seo-analyzer.php
- Modified: 2026-07-22T13:23:20+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/thinkrank/1.26.0/code/includes/abilities/analysis/class-run-seo-analyzer.php#L10-L20`.

```php
<?php
/**
 * Run Site SEO Analyzer audit ability.
 *
 * @package ThinkRank\Abilities\Analysis
 */

declare(strict_types=1);

namespace ThinkRank\Abilities\Analysis;

use ThinkRank\SEO\SEO_Analyzer;

if ( ! defined( 'ABSPATH' ) ) {
	exit; // Exit if accessed directly.
}

/**
 * Runs a fresh whole-site SEO audit (Site SEO Analyzer).
 *
 * Mirrors `POST /thinkrank/v1/seo-analyzer/run`: forces a fresh crawl-free
 * audit (bypassing and refreshing the hourly cache) and returns the same
 * payload shape as `get-seo-analyzer`. Idempotent — running it repeatedly
 * re-computes the current site state without side effects on content.
 */
class Run_Seo_Analyzer extends Get_Seo_Analyzer {
	/**
	 * Constructor.
	 */
	public function __construct() {
		$this->id          = 'thinkrank/run-seo-analyzer';
		$this->label       = __( 'Run Site SEO Analyzer Audit', 'thinkrank' );
		$this->description = __( 'Run a fresh whole-site SEO audit (Site SEO Analyzer), bypassing and refreshing the hourly cache. Returns the same payload as get-seo-analyzer: overall 0-100 score, grade, summary counts, and per-check results across Basic, Advanced, Content, Performance, and Security.', 'thinkrank' );
	}

	/**
	 * {@inheritDoc}
	 *
	 * @return array<string, bool|float|string>
	 */
	public function get_annotations() {
		return [
			'readonly'      => false,
			'destructive'   => false,
			'idempotent'    => true,
			'priority'      => 2.0,
			'openWorldHint' => false,
		];
	}

	/**
	 * Execute ability.
	 *
	 * @param array<string, mixed> $input Ability input payload.
	 * @return array<string, mixed>
	 */
	public function execute( $input ) {
		$analyzer = new SEO_Analyzer();

		return $analyzer->run( true );
	}
}

```
