# wordpress-seo/27.6/src/plugins-tab/domain/plugin-detector.php

Yoast SEO – Advanced SEO with real-time guidance and built-in AI, version 27.6. 40 lines.

- Page: https://pluginprobe.com/plugins/wordpress-seo/27.6/code/src/plugins-tab/domain/plugin-detector.php
- Raw: https://pluginprobe.com/plugins/wordpress-seo/27.6/raw/src/plugins-tab/domain/plugin-detector.php
- Modified: 2026-03-31T11:40:40+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/wordpress-seo/27.6/code/src/plugins-tab/domain/plugin-detector.php#L10-L20`.

```php
<?php

// phpcs:disable Yoast.NamingConventions.NamespaceName.TooLong -- Needed in the folder structure.
namespace Yoast\WP\SEO\Plugins_Tab\Domain;

/**
 * Detects whether a plugin is a Yoast plugin by checking its author information.
 */
class Plugin_Detector {

	/**
	 * The string to look for in the plugin's AuthorName field.
	 *
	 * @var string
	 */
	public const AUTHOR_IDENTIFIER = 'Team Yoast';

	/**
	 * The minimum number of Yoast plugins required to show the tab.
	 *
	 * @var int
	 */
	public const MINIMUM_FOR_TAB = 2;

	/**
	 * Checks whether a plugin is a Yoast plugin based on its author data.
	 *
	 * @param array<string, string> $plugin_data The plugin data array.
	 *
	 * @return bool Whether the plugin is a Yoast plugin.
	 */
	public function is_yoast_plugin( array $plugin_data ): bool {
		if ( ! isset( $plugin_data['AuthorName'] ) || ! \is_string( $plugin_data['AuthorName'] ) ) {
			return false;
		}

		return \str_contains( $plugin_data['AuthorName'], self::AUTHOR_IDENTIFIER );
	}
}

```
