# wp-optimize/4.5.2/includes/tables/class-wp-optimize-table-404-detector.php

WP-Optimize – Cache, Compress images, Minify &amp; Clean database to boost page speed &amp; performance, version 4.5.2. 62 lines.

- Page: https://pluginprobe.com/plugins/wp-optimize/4.5.2/code/includes/tables/class-wp-optimize-table-404-detector.php
- Raw: https://pluginprobe.com/plugins/wp-optimize/4.5.2/raw/includes/tables/class-wp-optimize-table-404-detector.php
- Modified: 2026-03-25T10:42:14+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/wp-optimize/4.5.2/code/includes/tables/class-wp-optimize-table-404-detector.php#L10-L20`.

```php
<?php
if (!defined('ABSPATH')) die('No direct access allowed');

if (!class_exists('WP_Optimize_Table_404_Detector')) :

class WP_Optimize_Table_404_Detector implements WP_Optimize_Table_Interface {

	/**
	 * Name of the table
	 *
	 * @var string
	 */
	private $table_name = '404_detector';

	/**
	 * Complete table name with a prefix
	 *
	 * @return string
	 */
	public function get_table_name(): string {
		global $wpdb;

		return $wpdb->base_prefix . 'wpo_' . $this->table_name;
	}

	/**
	 * Table fields and keys (if any)
	 *
	 * @return array
	 */
	public function describe(): array {
		return array(
			'fields' => array(
				'url'               => 'TEXT NOT NULL',
				'request_timestamp' => 'BIGINT UNSIGNED NOT NULL',
				'request_count'     => 'BIGINT UNSIGNED NOT NULL',
				'referrer'          => 'TEXT NOT NULL'
			),
			'keys' => array(
				'url_timestamp_referrer' => '(url(75),request_timestamp,referrer(75))',
				'timestamp_count'        => '(request_timestamp,request_count)'
			),
			'unique' => 'url(75),request_timestamp,referrer(75)'
		);
	}
	
	/**
	 * Returns singleton instance
	 *
	 * @return WP_Optimize_Table_404_Detector
	 */
	public static function get_instance() {
		static $instance = null;
		if (null === $instance) {
			$instance = new static();
		}
		return $instance;
	}
}

endif;

```
