{"id":405945,"date":"2026-11-16T11:25:21","date_gmt":"2026-11-16T11:25:21","guid":{"rendered":"https:\/\/wordpress.org\/plugins\/redirect-inspector\/"},"modified":"2026-11-16T13:56:09","modified_gmt":"2026-11-16T13:56:09","slug":"onehop-redirect-checker","status":"publish","type":"plugin","link":"https:\/\/wordpress.org\/plugins\/onehop-redirect-checker\/","author":21075312,"comment_status":"closed","ping_status":"closed","template":"","meta":{"version":"1.1.0","stable_tag":"1.1.0","tested":"7.1.4","requires":"6.9","requires_php":"8.1","requires_plugins":null,"header_name":"Onehop Redirect Checker","header_author":"Paul van Impelen","header_description":"Finds redirect loops, chains and redirects you don't need across ten SEO and redirect plugins at once, and fixes the clear-cut ones.","last_updated":"2026-11-16 13:56:09","external_support_url":"","external_repository_url":"","donate_link":"","header_plugin_uri":"https:\/\/github.com\/paulAcato\/onehop-redirect-checker","header_author_uri":"https:\/\/profiles.wordpress.org\/paulacato\/","rating":0,"author_block_rating":0,"active_installs":0,"downloads":97,"num_ratings":0,"support_threads":0,"support_threads_resolved":0,"author_block_count":0,"sections":["description","installation","faq","changelog"],"tags":{"1.0.0":{"tag":"1.0.0","author":"paulacato","date":"2026-11-16 11:25:12","revision":3804959},"1.1.0":{"tag":"1.1.0","author":"paulacato","date":"2026-11-16 13:56:09","revision":3805297}},"upgrade_notice":[],"ratings":[],"assets_icons":{"icon-128x128.png":{"filename":"icon-128x128.png","revision":3804959,"resolution":"128x128","location":"assets","locale":"","width":128,"height":128},"icon-256x256.png":{"filename":"icon-256x256.png","revision":3804959,"resolution":"256x256","location":"assets","locale":"","width":256,"height":256}},"assets_banners":{"banner-1544x500.png":{"filename":"banner-1544x500.png","revision":3804959,"resolution":"1544x500","location":"assets","locale":"","width":1544,"height":500},"banner-772x250.png":{"filename":"banner-772x250.png","revision":3804959,"resolution":"772x250","location":"assets","locale":"","width":772,"height":250}},"assets_blueprints":{"blueprint.json":{"filename":"blueprint.json","revision":3805315,"resolution":false,"location":"assets","locale":"","contents":"{\"$schema\":\"https:\\\/\\\/playground.wordpress.net\\\/blueprint-schema.json\",\"landingPage\":\"\\\/wp-admin\\\/tools.php?page=onehop-redirect-checker\",\"preferredVersions\":{\"php\":\"8.2\",\"wp\":\"latest\"},\"features\":{\"networking\":true},\"steps\":[{\"step\":\"login\",\"username\":\"admin\",\"password\":\"password\"},{\"step\":\"defineWpConfigConsts\",\"consts\":{\"WP_ENVIRONMENT_TYPE\":\"development\"}},{\"step\":\"setSiteOptions\",\"options\":{\"permalink_structure\":\"\\\/%postname%\\\/\"}},{\"step\":\"installPlugin\",\"pluginData\":{\"resource\":\"wordpress.org\\\/plugins\",\"slug\":\"redirection\"},\"options\":{\"activate\":true}},{\"step\":\"installPlugin\",\"pluginData\":{\"resource\":\"wordpress.org\\\/plugins\",\"slug\":\"seo-by-rank-math\"},\"options\":{\"activate\":true}},{\"step\":\"installPlugin\",\"pluginData\":{\"resource\":\"wordpress.org\\\/plugins\",\"slug\":\"safe-redirect-manager\"},\"options\":{\"activate\":true}},{\"step\":\"installPlugin\",\"pluginData\":{\"resource\":\"wordpress.org\\\/plugins\",\"slug\":\"simple-301-redirects\"},\"options\":{\"activate\":true}},{\"step\":\"installPlugin\",\"pluginData\":{\"resource\":\"wordpress.org\\\/plugins\",\"slug\":\"eps-301-redirects\"},\"options\":{\"activate\":true}},{\"step\":\"installPlugin\",\"pluginData\":{\"resource\":\"wordpress.org\\\/plugins\",\"slug\":\"slim-seo\"},\"options\":{\"activate\":true}},{\"step\":\"installPlugin\",\"pluginData\":{\"resource\":\"wordpress.org\\\/plugins\",\"slug\":\"smartcrawl-seo\"},\"options\":{\"activate\":true}},{\"step\":\"installPlugin\",\"pluginData\":{\"resource\":\"wordpress.org\\\/plugins\",\"slug\":\"wp-seopress\"},\"options\":{\"activate\":true}},{\"step\":\"installPlugin\",\"pluginData\":{\"resource\":\"wordpress.org\\\/plugins\",\"slug\":\"autodescription\"},\"options\":{\"activate\":true}},{\"step\":\"installPlugin\",\"pluginData\":{\"resource\":\"wordpress.org\\\/plugins\",\"slug\":\"onehop-redirect-checker\"},\"options\":{\"activate\":true}},{\"step\":\"runPHP\",\"code\":\"<?php\\nrequire_once '\\\/wordpress\\\/wp-load.php';\\nwp_set_current_user( 1 );\\n\\nif ( ! class_exists( 'WP_CLI' ) ) {\\n\\tdefine( 'WP_CLI', true );\\n\\tclass WP_CLI {\\n\\t\\tpublic static function log( $message ) {}\\n\\t\\tpublic static function warning( $message ) { error_log( 'Seed: ' . $message ); }\\n\\t\\tpublic static function success( $message ) {}\\n\\t\\tpublic static function error( $message ) { throw new RuntimeException( $message ); }\\n\\t}\\n}\\n\\n\\\/\\\/ Redirection creates its tables on first use of its admin screen; create them now.\\nforeach ( [ 'Redirection\\\\\\\\Database\\\\\\\\Database', 'Red_Database' ] as $rdi_db ) {\\n\\tif ( class_exists( $rdi_db ) && method_exists( $rdi_db, 'get_latest_database' ) ) {\\n\\t\\t$rdi_db::get_latest_database()->install();\\n\\t\\tbreak;\\n\\t}\\n}\\nif ( function_exists( 'red_get_options' ) && function_exists( 'red_set_options' ) ) {\\n\\tred_set_options( [ 'database' => REDIRECTION_DB_VERSION ] );\\n}\\n\\n$args = [];\\n\\\/**\\n * Dummy redirects for every supported plugin. Development only; not part of the release.\\n *\\n * Usage: wp eval-file bin\\\/seed-dummy-data.php            (seed \\\/ re-seed)\\n *        wp eval-file bin\\\/seed-dummy-data.php remove     (remove seed data)\\n *\\n * Idempotent: everything it creates is recorded in the `onehop_redirect_checker_seed` option and\\n * removed again on the next run (S12: it never touches rules it didn't create). One exception:\\n * Yoast rules on one of the seed's own demo paths are removed too. Those are copies of seed rules\\n * that Onehop Redirect Checker's migration wrote into Yoast, and they would otherwise stay behind for good.\\n *\\n * @package Onehop\\\\RedirectChecker\\n *\\\/\\n\\nif ( ! defined( 'WP_CLI' ) || ! WP_CLI ) {\\n\\texit;\\n}\\n\\nif ( ! in_array( wp_get_environment_type(), [ 'local', 'development' ], true ) ) {\\n\\tWP_CLI::error( 'The seed script only runs on local or development environments.' );\\n}\\n\\nconst RDI_SEED_OPTION = 'onehop_redirect_checker_seed';\\n\\n$manifest = get_option( RDI_SEED_OPTION, [] );\\n$manifest = is_array( $manifest ) ? $manifest : [];\\n\\nglobal $wpdb;\\n\\n\\\/**\\n * Whether one of this site's tables exists (plugins keep their tables while inactive).\\n *\\n * @param string $table Table name without prefix.\\n *\\n * @return bool\\n *\\\/\\n$rdi_has_table = static function ( string $table ) use ( $wpdb ): bool {\\n\\treturn $wpdb->get_var( $wpdb->prepare( 'SHOW TABLES LIKE %s', $wpdb->prefix . $table ) ) === $wpdb->prefix . $table; \\\/\\\/ phpcs:ignore\\n};\\n\\n\\\/*\\n * 0. The seed data, per plugin. The sections below write it in each plugin's storage format.\\n *\\\/\\n\\n\\\/\\\/ Redirection: [ from, to, regex?, status? ].\\n$seed_redirection = [\\n\\t[ '\\\/old-about', '\\\/about-old' ],\\n\\t[ '\\\/about-old', '\\\/about-2020' ],\\n\\t[ '\\\/about-2020', '\\\/about-us' ],\\n\\t[ '\\\/loop-a', '\\\/loop-b' ],\\n\\t[ '\\\/loop-b', '\\\/loop-a' ],\\n\\t[ '\\\/self', '\\\/self' ],\\n\\t[ '^\\\/blog\\\/(.*)$', '\\\/news\\\/$1', true ],\\n\\t[ '^\\\/news\\\/(.+)$', '\\\/blog\\\/$1', true ],\\n\\t[ '\\\/old-pricing', '\\\/pricing-2019' ],\\n\\t[ '\\\/dup-source', '\\\/contact' ],\\n\\t[ '\\\/conflict-source', '\\\/contact' ],\\n\\t[ '\\\/promo', '\\\/promo-2024' ],\\n\\t[ '\\\/cross-a', '\\\/cross-b' ],\\n\\t[ '\\\/disabled-rule', '\\\/contact', false, 'disabled' ],\\n\\t\\\/\\\/ Three-hop chain to the FAQ page, a three-node loop, and a target that doesn't exist.\\n\\t[ '\\\/old-faq', '\\\/faq-2021' ],\\n\\t[ '\\\/faq-2021', '\\\/faq-2022' ],\\n\\t[ '\\\/faq-2022', '\\\/faq' ],\\n\\t[ '\\\/tri-a', '\\\/tri-b' ],\\n\\t[ '\\\/tri-b', '\\\/tri-c' ],\\n\\t[ '\\\/tri-c', '\\\/tri-a' ],\\n\\t[ '\\\/old-brochure', '\\\/brochure-2018' ],\\n];\\n\\n\\\/\\\/ Yoast SEO Premium: [ origin, url, format ]. Origins have no leading slash.\\n$seed_yoast = [\\n\\t[ 'promo-2024', 'pricing', 'plain' ],\\n\\t[ 'help\\\/', 'help', 'plain' ],\\n\\t[ '^shop\\\/(.*)', 'store\\\/$1', 'regex' ],\\n\\t[ '^(?i)Team-(\\\\\\\\d+)$', 'team', 'regex' ],\\n\\t[ 'cross-c', 'cross-a', 'plain' ],\\n\\t\\\/\\\/ Chain inside Yoast, a second trailing-slash no-op, a duplicate of Rank Math, a broken target.\\n\\t[ 'old-vacatures', 'vacatures-2022', 'plain' ],\\n\\t[ 'vacatures-2022', 'careers', 'plain' ],\\n\\t[ 'downloads\\\/', 'downloads', 'plain' ],\\n\\t[ 'yoast-dup', 'contact', 'plain' ],\\n\\t[ 'contact-us', 'contact-form-old', 'plain' ],\\n];\\n\\n\\\/\\\/ Rank Math: [ pattern, comparison, absolute target ] (filled in once home_url() is final).\\n$seed_rank_math = [\\n\\t[ 'cross-b', 'exact', '\\\/cross-c' ],\\n\\t[ 'archive-2019', 'start', '\\\/news' ],\\n\\t[ 'services', 'exact', '\\\/pricing' ],\\n\\t[ '^docs\\\/v1\\\/(.*)', 'regex', '\\\/docs\\\/v2\\\/$1' ],\\n\\t\\\/\\\/ Duplicate of Yoast, a rule hiding the Partners page, one side of a conflict with SRM.\\n\\t[ 'yoast-dup', 'exact', '\\\/contact' ],\\n\\t[ 'partners', 'exact', '\\\/about-us' ],\\n\\t[ 'rm-conflict', 'exact', '\\\/contact' ],\\n];\\n\\n\\\/\\\/ Safe Redirect Manager: [ from, to, regex? ].\\n$seed_srm = [\\n\\t[ '\\\/conflict-source', '\\\/team', false ],\\n\\t[ '\\\/careers-old', '\\\/jobs', false ],\\n\\t[ '\\\/jobs', '\\\/careers', false ],\\n\\t[ '\\\/legacy\\\/*', '\\\/news\\\/*', false ],\\n\\t[ '\\\/products\\\/([a-z]+)\\\/?$', '\\\/shop\\\/$1', true ],\\n\\t\\\/\\\/ The other side of the Rank Math conflict, and the start of a chain over three plugins.\\n\\t[ '\\\/rm-conflict', '\\\/faq', false ],\\n\\t[ '\\\/srm-old', '\\\/srm-mid', false ],\\n];\\n\\n\\\/\\\/ Simple 301 Redirects: from => to.\\n$seed_simple = [\\n\\t'\\\/dup-source'  => '\\\/contact',\\n\\t'\\\/old-launch'  => '\\\/launch-announcement',\\n\\t'\\\/old-shop\\\/*'  => '\\\/store\\\/*',\\n\\t'\\\/Pricing-Old' => '\\\/pricing',\\n\\t'\\\/s301-loop'   => '\\\/eps-loop', \\\/\\\/ Loop with 301 Redirects.\\n];\\n\\n\\\/\\\/ 301 Redirects: [ from, to ]. Sources have no leading slash.\\n$seed_eps = [\\n\\t[ 'eps-old', '\\\/eps-mid' ],\\n\\t[ 'dup-source', '\\\/contact' ],\\n\\t[ 'eps-loop', '\\\/s301-loop' ],\\n];\\n\\n\\\/\\\/ Slim SEO: [ from, to, condition ].\\n$seed_slim = [\\n\\t[ 'eps-mid', 'contact', 'exact-match' ],\\n\\t[ '^docs\\\/v2\\\/(.*)', 'docs\\\/$1', 'regex' ],\\n\\t[ 'srm-mid', 'srm-end', 'exact-match' ], \\\/\\\/ Second leg of the SRM chain.\\n];\\n\\n\\\/\\\/ SmartCrawl: [ from, target path, regex? ]. The regex redirects into itself: a loop.\\n$seed_smartcrawl = [\\n\\t[ '\\\/old-seopress', '\\\/seopress-page', false ],\\n\\t[ '\\\/sc-target', '\\\/tsf-page', false ],\\n\\t[ '^\\\/kb\\\/(.+)$', '\\\/kb\\\/$1', true ],\\n\\t[ '\\\/srm-end', '\\\/about-us', false ], \\\/\\\/ Last leg of the SRM chain.\\n];\\n\\n\\\/**\\n * A rule source reduced to the part every plugin keeps: no anchors, outer slashes, escapes or\\n * wildcard syntax. A Yoast copy of a seed rule has the same stem as the rule it was copied from.\\n *\\n * @param string $source Source URL or pattern.\\n *\\n * @return string\\n *\\\/\\n$rdi_stem = static fn( string $source ): string => stripslashes( (string) preg_replace( '\\\/(?<!\\\\.)\\\\*\\\/', '(.*)', trim( $source, '^$\\\/' ) ) );\\n\\n$seed_stems = [];\\nforeach ( array_merge( array_column( $seed_redirection, 0 ), array_column( $seed_yoast, 0 ), array_column( $seed_rank_math, 0 ), array_column( $seed_srm, 0 ), array_keys( $seed_simple ), array_column( $seed_eps, 0 ), array_column( $seed_slim, 0 ), array_column( $seed_smartcrawl, 0 ) ) as $seed_source ) {\\n\\t$stem                         = $rdi_stem( $seed_source );\\n\\t$seed_stems[ $stem ]          = true;\\n\\t$seed_stems[ $stem . '(.*)' ] = true; \\\/\\\/ \\\"Starts with\\\" rules are copied as a prefix pattern.\\n}\\n\\n\\\/*\\n * 1. Remove the previous seed.\\n *\\\/\\n\\nif ( ! empty( $manifest['redirection_group'] ) && $rdi_has_table( 'redirection_groups' ) ) {\\n\\t\\\/\\\/ Directly, so it also works while Redirection is inactive.\\n\\t$wpdb->delete( $wpdb->prefix . 'redirection_items', [ 'group_id' => (int) $manifest['redirection_group'] ] ); \\\/\\\/ phpcs:ignore\\n\\t$wpdb->delete( $wpdb->prefix . 'redirection_groups', [ 'id' => (int) $manifest['redirection_group'] ] ); \\\/\\\/ phpcs:ignore\\n}\\n\\nif ( ! empty( $manifest['rank_math_ids'] ) && $rdi_has_table( 'rank_math_redirections' ) ) {\\n\\t$ids = implode( ',', array_map( 'absint', $manifest['rank_math_ids'] ) );\\n\\t$wpdb->query( \\\"DELETE FROM {$wpdb->prefix}rank_math_redirections WHERE id IN ({$ids})\\\" ); \\\/\\\/ phpcs:ignore\\n}\\n\\nforeach ( $manifest['srm_ids'] ?? [] as $seed_post_id ) {\\n\\twp_delete_post( (int) $seed_post_id, true );\\n}\\n\\n$yoast = get_option( 'wpseo-premium-redirects-base', [] );\\n$yoast = is_array( $yoast ) ? $yoast : [];\\n$yoast = array_values(\\n\\tarray_filter(\\n\\t\\t$yoast,\\n\\t\\tstatic fn( $item ) => is_array( $item )\\n\\t\\t\\t&& ! in_array( $item['origin'] ?? '', $manifest['yoast_origins'] ?? [], true )\\n\\t\\t\\t&& ! isset( $seed_stems[ $rdi_stem( (string) ( $item['origin'] ?? '' ) ) ] )\\n\\t)\\n);\\n\\n$simple = get_option( '301_redirects', [] );\\n$simple = is_array( $simple ) ? $simple : [];\\nforeach ( $manifest['simple_keys'] ?? [] as $key ) {\\n\\tunset( $simple[ $key ] );\\n}\\n\\nforeach ( $manifest['post_ids'] ?? [] as $seed_post_id ) {\\n\\twp_delete_post( (int) $seed_post_id, true );\\n}\\n\\nif ( ! empty( $manifest['eps_ids'] ) && $rdi_has_table( 'redirects' ) ) {\\n\\t$wpdb->query( $wpdb->prepare( 'DELETE FROM %i WHERE id IN (' . implode( ',', array_map( 'absint', $manifest['eps_ids'] ) ) . ')', $wpdb->prefix . 'redirects' ) ); \\\/\\\/ phpcs:ignore\\n}\\nif ( ! empty( $manifest['smartcrawl_ids'] ) && $rdi_has_table( 'smartcrawl_redirects' ) ) {\\n\\t$wpdb->query( $wpdb->prepare( 'DELETE FROM %i WHERE id IN (' . implode( ',', array_map( 'absint', $manifest['smartcrawl_ids'] ) ) . ')', $wpdb->prefix . 'smartcrawl_redirects' ) ); \\\/\\\/ phpcs:ignore\\n}\\n$slim = get_option( 'ss_redirects', [] );\\n$slim = is_array( $slim ) ? array_diff_key( $slim, array_flip( $manifest['slim_ids'] ?? [] ) ) : [];\\nupdate_option( 'ss_redirects', $slim );\\n\\nif ( ! empty( $manifest['redirection_404_ids'] ) && $rdi_has_table( 'redirection_404' ) ) {\\n\\t$wpdb->query( $wpdb->prepare( 'DELETE FROM %i WHERE id IN (' . implode( ',', array_map( 'absint', $manifest['redirection_404_ids'] ) ) . ')', $wpdb->prefix . 'redirection_404' ) ); \\\/\\\/ phpcs:ignore\\n}\\n\\nupdate_option( 'wpseo-premium-redirects-base', $yoast, false );\\nupdate_option( '301_redirects', $simple );\\ndelete_option( RDI_SEED_OPTION );\\n\\nif ( 'remove' === ( $args[0] ?? '' ) ) {\\n\\tWP_CLI::success( 'Seed data removed.' );\\n\\treturn;\\n}\\n\\n$manifest = [];\\n\\n\\\/*\\n * 2. Content: pages the redirects point to, and a post whose slug changed (\\u2192 _wp_old_slug).\\n *\\\/\\n$seed_pages = [\\n\\t'about-us' => 'About us',\\n\\t'services' => 'Services',\\n\\t'contact'  => 'Contact',\\n\\t'team'     => 'Team',\\n\\t'pricing'  => 'Pricing',\\n\\t'news'     => 'News',\\n\\t'careers'  => 'Careers',\\n\\t'faq'      => 'FAQ',\\n\\t'partners' => 'Partners',\\n];\\nforeach ( $seed_pages as $slug => $seed_title ) {\\n\\tif ( get_page_by_path( $slug ) ) {\\n\\t\\tcontinue;\\n\\t}\\n\\t$manifest['post_ids'][] = wp_insert_post(\\n\\t\\t[\\n\\t\\t\\t'post_type'    => 'page',\\n\\t\\t\\t'post_status'  => 'publish',\\n\\t\\t\\t'post_name'    => $slug,\\n\\t\\t\\t'post_title'   => $seed_title,\\n\\t\\t\\t'post_content' => '<!-- wp:paragraph --><p>Onehop Redirect Checker demo page.<\\\/p><!-- \\\/wp:paragraph -->',\\n\\t\\t]\\n\\t);\\n}\\n\\n$launch = get_page_by_path( 'launch-announcement', OBJECT, 'post' );\\nif ( ! $launch ) {\\n\\t$launch_id = wp_insert_post(\\n\\t\\t[\\n\\t\\t\\t'post_type'   => 'post',\\n\\t\\t\\t'post_status' => 'publish',\\n\\t\\t\\t'post_name'   => 'old-launch',\\n\\t\\t\\t'post_title'  => 'Launch announcement',\\n\\t\\t]\\n\\t);\\n\\twp_update_post(\\n\\t\\t[\\n\\t\\t\\t'ID'        => $launch_id,\\n\\t\\t\\t'post_name' => 'launch-announcement',\\n\\t\\t]\\n\\t); \\\/\\\/ Core stores `old-launch` in _wp_old_slug.\\n\\t$manifest['post_ids'][] = $launch_id;\\n}\\n\\n\\\/*\\n * 3. Redirection: chains, 2- and 3-node loops, self-loop, regex loop, disabled rule, broken\\n *    targets, duplicate, conflict, cross-plugin chain and loop legs.\\n *\\\/\\nif ( $rdi_has_table( 'redirection_items' ) && $rdi_has_table( 'redirection_groups' ) ) {\\n\\t\\\/\\\/ Redirection's API when it is active; its own table format when it isn't.\\n\\t$api = class_exists( 'Red_Group' ) && class_exists( 'Red_Item' );\\n\\tif ( $api ) {\\n\\t\\t$gid = Red_Group::create( 'Onehop Redirect Checker seed', 1 )->get_id();\\n\\t} else {\\n\\t\\t$wpdb->insert( $wpdb->prefix . 'redirection_groups', [ 'name' => 'Onehop Redirect Checker seed', 'tracking' => 1, 'module_id' => 1, 'status' => 'enabled', 'position' => 0 ] ); \\\/\\\/ phpcs:ignore\\n\\t\\t$gid = (int) $wpdb->insert_id;\\n\\t}\\n\\n\\tforeach ( $seed_redirection as $position => $row ) {\\n\\t\\tif ( ! $api ) {\\n\\t\\t\\t$wpdb->insert( \\\/\\\/ phpcs:ignore\\n\\t\\t\\t\\t$wpdb->prefix . 'redirection_items',\\n\\t\\t\\t\\t[\\n\\t\\t\\t\\t\\t'url'         => $row[0],\\n\\t\\t\\t\\t\\t'match_url'   => ! empty( $row[2] ) ? 'regex' : strtolower( $row[0] ),\\n\\t\\t\\t\\t\\t'match_data'  => wp_json_encode( [ 'source' => [ 'flag_regex' => ! empty( $row[2] ) ] ] ),\\n\\t\\t\\t\\t\\t'regex'       => ! empty( $row[2] ) ? 1 : 0,\\n\\t\\t\\t\\t\\t'position'    => $position,\\n\\t\\t\\t\\t\\t'group_id'    => $gid,\\n\\t\\t\\t\\t\\t'status'      => 'disabled' === ( $row[3] ?? '' ) ? 'disabled' : 'enabled',\\n\\t\\t\\t\\t\\t'action_type' => 'url',\\n\\t\\t\\t\\t\\t'action_code' => 301,\\n\\t\\t\\t\\t\\t'action_data' => $row[1],\\n\\t\\t\\t\\t\\t'match_type'  => 'url',\\n\\t\\t\\t\\t\\t'title'       => '',\\n\\t\\t\\t\\t]\\n\\t\\t\\t);\\n\\t\\t\\tcontinue;\\n\\t\\t}\\n\\t\\t$item = Red_Item::create(\\n\\t\\t\\t[\\n\\t\\t\\t\\t'url'         => $row[0],\\n\\t\\t\\t\\t'action_data' => [ 'url' => $row[1] ],\\n\\t\\t\\t\\t'regex'       => ! empty( $row[2] ),\\n\\t\\t\\t\\t'group_id'    => $gid,\\n\\t\\t\\t\\t'match_type'  => 'url',\\n\\t\\t\\t\\t'action_type' => 'url',\\n\\t\\t\\t\\t'action_code' => 301,\\n\\t\\t\\t]\\n\\t\\t);\\n\\t\\tif ( is_wp_error( $item ) ) {\\n\\t\\t\\tWP_CLI::warning( 'Redirection: ' . $item->get_error_message() );\\n\\t\\t\\tcontinue;\\n\\t\\t}\\n\\t\\tif ( 'disabled' === ( $row[3] ?? '' ) ) {\\n\\t\\t\\t$item->disable();\\n\\t\\t}\\n\\t}\\n\\n\\t$manifest['redirection_group'] = $gid;\\n} else {\\n\\tWP_CLI::warning( 'Redirection has no tables (never activated, or its data was purged): activate it once and seed again; skipped.' );\\n}\\n\\n\\\/*\\n * 3b. Old URLs visitors still request (Redirection's 404 log): the URLs pattern rules are for.\\n *     Migrating a pattern rule into a plugin that only holds exact rules expands it over these.\\n *\\\/\\nif ( $rdi_has_table( 'redirection_404' ) ) {\\n\\tforeach ( [ '\\\/docs\\\/v1\\\/install', '\\\/docs\\\/v1\\\/upgrade', '\\\/products\\\/shoes', '\\\/products\\\/socks', '\\\/blog\\\/hello-world', '\\\/legacy\\\/brochure', '\\\/old-shop\\\/gift-card' ] as $seed_url ) {\\n\\t\\t$wpdb->insert( $wpdb->prefix . 'redirection_404', [ 'created' => current_time( 'mysql', true ), 'url' => $seed_url, 'http_code' => 404, 'request_method' => 'GET', 'agent' => 'Onehop Redirect Checker seed' ] ); \\\/\\\/ phpcs:ignore\\n\\t\\t$manifest['redirection_404_ids'][] = (int) $wpdb->insert_id;\\n\\t}\\n}\\n\\n\\\/*\\n * 4. Yoast SEO Premium (its storage format): chains, trailing-slash no-ops, regex rules,\\n *    duplicate, broken target, cross-plugin loop leg. Free Yoast SEO doesn't read this option,\\n *    so without Premium these rules are leftovers.\\n *\\\/\\nforeach ( $seed_yoast as [ $origin, $url, $format ] ) {\\n\\t$yoast[]                     = [\\n\\t\\t'origin' => $origin,\\n\\t\\t'url'    => $url,\\n\\t\\t'type'   => 301,\\n\\t\\t'format' => $format,\\n\\t];\\n\\t$manifest['yoast_origins'][] = $origin;\\n}\\nupdate_option( 'wpseo-premium-redirects-base', $yoast, false );\\n\\n\\\/*\\n * 5. Rank Math: cross-plugin loop leg, \\\"starts with\\\" rule, rules hiding published pages,\\n *    duplicate, conflict.\\n *\\\/\\nif ( class_exists( '\\\\RankMath\\\\Installer' ) || $rdi_has_table( 'rank_math_redirections' ) ) {\\n\\t$modules = get_option( 'rank_math_modules', [] );\\n\\tif ( ! in_array( 'redirections', (array) $modules, true ) ) {\\n\\t\\t$modules[] = 'redirections';\\n\\t\\tupdate_option( 'rank_math_modules', $modules );\\n\\t}\\n\\tif ( class_exists( '\\\\RankMath\\\\Installer' ) ) {\\n\\t\\t\\\\RankMath\\\\Installer::create_tables( [ 'redirections' ] );\\n\\t}\\n\\n\\tforeach ( $seed_rank_math as [ $pattern, $comparison, $seed_to ] ) {\\n\\t\\t$seed_to = home_url( $seed_to );\\n\\t\\t$wpdb->insert(\\n\\t\\t\\t\\\"{$wpdb->prefix}rank_math_redirections\\\",\\n\\t\\t\\t[\\n\\t\\t\\t\\t'sources'     => serialize( \\\/\\\/ phpcs:ignore WordPress.PHP.DiscouragedPHPFunctions.serialize_serialize -- Rank Math's own storage format.\\n\\n\\t\\t\\t\\t\\t[\\n\\t\\t\\t\\t\\t[\\n\\t\\t\\t\\t\\t'pattern'    => $pattern,\\n\\t\\t\\t\\t\\t'comparison' => $comparison,\\n\\t\\t\\t\\t\\t'ignore'     => 'case',\\n\\t\\t\\t\\t\\t],\\n\\t\\t\\t\\t\\t]\\n\\t\\t\\t\\t), \\\/\\\/ phpcs:ignore WordPress.PHP.DiscouragedPHPFunctions.serialize_serialize -- Rank Math's own storage format.\\n\\t\\t\\t\\t'url_to'      => $seed_to,\\n\\t\\t\\t\\t'header_code' => 301,\\n\\t\\t\\t\\t'status'      => 'active',\\n\\t\\t\\t\\t'created'     => current_time( 'mysql' ),\\n\\t\\t\\t\\t'updated'     => current_time( 'mysql' ),\\n\\t\\t\\t]\\n\\t\\t);\\n\\t\\t$manifest['rank_math_ids'][] = (int) $wpdb->insert_id;\\n\\t}\\n} else {\\n\\tWP_CLI::warning( 'Rank Math has no tables (never activated); skipped.' );\\n}\\n\\n\\\/*\\n * 6. Safe Redirect Manager: conflicts, chains, wildcard that runs into the regex loop.\\n *\\\/\\nif ( function_exists( 'srm_create_redirect' ) ) {\\n\\tforeach ( $seed_srm as [ $seed_from, $seed_to, $regex ] ) {\\n\\t\\t$seed_id = srm_create_redirect( $seed_from, $seed_to, 301, $regex );\\n\\t\\tif ( is_wp_error( $seed_id ) ) {\\n\\t\\t\\tWP_CLI::warning( 'SRM: ' . $seed_id->get_error_message() );\\n\\t\\t\\tcontinue;\\n\\t\\t}\\n\\t\\t$manifest['srm_ids'][] = (int) $seed_id;\\n\\t}\\n} else {\\n\\t\\\/\\\/ SRM's own storage: a redirect_rule post with its meta.\\n\\tforeach ( $seed_srm as $position => [ $seed_from, $seed_to, $regex ] ) {\\n\\t\\t$manifest['srm_ids'][] = (int) wp_insert_post(\\n\\t\\t\\t[\\n\\t\\t\\t\\t'post_type'   => 'redirect_rule',\\n\\t\\t\\t\\t'post_status' => 'publish',\\n\\t\\t\\t\\t'post_title'  => $seed_from,\\n\\t\\t\\t\\t'menu_order'  => $position,\\n\\t\\t\\t\\t'meta_input'  => [\\n\\t\\t\\t\\t\\t'_redirect_rule_from'        => $seed_from,\\n\\t\\t\\t\\t\\t'_redirect_rule_to'          => $seed_to,\\n\\t\\t\\t\\t\\t'_redirect_rule_status_code' => 301,\\n\\t\\t\\t\\t\\t'_redirect_rule_from_regex'  => $regex ? 1 : 0,\\n\\t\\t\\t\\t],\\n\\t\\t\\t]\\n\\t\\t);\\n\\t}\\n}\\n\\n\\\/*\\n * 7. Simple 301 Redirects: duplicate (same target), rule made redundant by _wp_old_slug,\\n *    wildcard rule, case-sensitive rule, cross-plugin loop leg.\\n *\\\/\\nforeach ( $seed_simple as $seed_from => $seed_to ) {\\n\\t$simple[ $seed_from ]      = $seed_to;\\n\\t$manifest['simple_keys'][] = $seed_from;\\n}\\nupdate_option( '301_redirects', $simple );\\nupdate_option( '301_redirects_wildcard', 'true' );\\n\\n\\\/*\\n * 8. 301 Redirects: a chain that continues in Slim SEO, a third copy of \\\/dup-source, and the\\n *    other leg of the Simple 301 loop.\\n *\\\/\\nglobal $wpdb;\\nif ( defined( 'EPS_REDIRECT_VERSION' ) || $rdi_has_table( 'redirects' ) ) {\\n\\tforeach ( $seed_eps as [ $seed_from, $seed_to ] ) {\\n\\t\\t$wpdb->insert( $wpdb->prefix . 'redirects', [ 'url_from' => $seed_from, 'url_to' => $seed_to, 'status' => '301', 'type' => 'url' ] ); \\\/\\\/ phpcs:ignore\\n\\t\\t$manifest['eps_ids'][] = (int) $wpdb->insert_id;\\n\\t}\\n} else {\\n\\tWP_CLI::warning( '301 Redirects has no table (never activated); skipped.' );\\n}\\n\\n\\\/*\\n * 9. Slim SEO: the second leg of the 301 Redirects chain, of the Rank Math docs chain (regex)\\n *    and of the SRM chain.\\n *\\\/\\nforeach ( $seed_slim as [ $seed_from, $seed_to, $condition ] ) {\\n\\t$seed_slim_id           = 'rdiseed' . substr( md5( $seed_from ), 0, 6 );\\n\\t$slim[ $seed_slim_id ] = [\\n\\t\\t'type'             => 301,\\n\\t\\t'condition'        => $condition,\\n\\t\\t'from'             => $seed_from,\\n\\t\\t'to'               => $seed_to,\\n\\t\\t'note'             => 'Onehop Redirect Checker seed',\\n\\t\\t'enable'           => 1,\\n\\t\\t'ignoreParameters' => 0,\\n\\t];\\n\\t$manifest['slim_ids'][] = $seed_slim_id;\\n}\\nupdate_option( 'ss_redirects', $slim );\\n\\n\\\/*\\n * 10. SEOPress and The SEO Framework redirect from a page itself; SmartCrawl links into both:\\n *     \\\/old-seopress \\u2192 (SEOPress page) \\u2192 \\\/about-us is a chain,\\n *     (SEO Framework page) \\u2192 \\\/sc-target \\u2192 back to that page is a loop.\\n *\\\/\\n$seed_page = static function ( string $slug, string $title ) use ( &$manifest ): int {\\n\\t$id                     = wp_insert_post( [ 'post_type' => 'page', 'post_status' => 'publish', 'post_name' => $slug, 'post_title' => $title ] );\\n\\t$manifest['post_ids'][] = $id;\\n\\treturn (int) $id;\\n};\\n$seopress_page = $seed_page( 'seopress-page', 'SEOPress demo page' );\\nupdate_post_meta( $seopress_page, '_seopress_redirections_enabled', 'yes' );\\nupdate_post_meta( $seopress_page, '_seopress_redirections_value', home_url( '\\\/about-us' ) );\\nupdate_post_meta( $seopress_page, '_seopress_redirections_type', '301' );\\nupdate_post_meta( $seopress_page, '_seopress_redirections_logged_status', 'both' );\\n\\n\\\/\\\/ A SEOPress page that redirects to a URL with no content: a broken target.\\n$seopress_gone = $seed_page( 'seopress-gone', 'SEOPress page that moved' );\\nupdate_post_meta( $seopress_gone, '_seopress_redirections_enabled', 'yes' );\\nupdate_post_meta( $seopress_gone, '_seopress_redirections_value', home_url( '\\\/gone-for-good' ) );\\nupdate_post_meta( $seopress_gone, '_seopress_redirections_type', '301' );\\nupdate_post_meta( $seopress_gone, '_seopress_redirections_logged_status', 'both' );\\n\\n$tsf_page = $seed_page( 'tsf-page', 'SEO Framework demo page' );\\nupdate_post_meta( $tsf_page, 'redirect', home_url( '\\\/sc-target' ) );\\n\\nif ( defined( 'SMARTCRAWL_PLUGIN_DIR' ) || $rdi_has_table( 'smartcrawl_redirects' ) ) {\\n\\t\\\/\\\/ SmartCrawl only redirects with its URL Redirection module on.\\n\\tif ( class_exists( '\\\\\\\\SmartCrawl\\\\\\\\Modules\\\\\\\\Advanced\\\\\\\\Redirects\\\\\\\\Controller' ) ) {\\n\\t\\t$sc = \\\\SmartCrawl\\\\Modules\\\\Advanced\\\\Redirects\\\\Controller::get();\\n\\t\\tif ( ! $sc->parent->should_run() ) {\\n\\t\\t\\t$sc->parent->update_option( 'active', true );\\n\\t\\t}\\n\\t\\t$sc->parent->update_option( $sc->module_name, array_merge( (array) $sc->options, [ 'active' => true ] ) );\\n\\t}\\n\\n\\tforeach ( $seed_smartcrawl as [ $seed_from, $seed_to, $regex ] ) {\\n\\t\\t$seed_to = $regex ? $seed_to : home_url( $seed_to );\\n\\t\\t$wpdb->insert( $wpdb->prefix . 'smartcrawl_redirects', [ 'title' => 'Onehop Redirect Checker seed', 'source' => $seed_from, 'path' => $regex ? 'regex' : $seed_from, 'destination' => wp_json_encode( $seed_to ), 'type' => 301, 'options' => $regex ? 'regex' : '', 'rules' => '[]' ] ); \\\/\\\/ phpcs:ignore\\n\\t\\t$manifest['smartcrawl_ids'][] = (int) $wpdb->insert_id;\\n\\t}\\n} else {\\n\\tWP_CLI::warning( 'SmartCrawl has no table (never activated); skipped.' );\\n}\\n\\nupdate_option( RDI_SEED_OPTION, $manifest, false );\\n\\nWP_CLI::success( 'Seeded redirects for all ten plugins (inactive ones in their own storage format, so they show up as leftovers; Yoast needs Yoast SEO Premium).' );\\nWP_CLI::log( 'Expected counts: see bin\\\/seed-expected.json. Verify with: wp onehop-redirect-checker scan' );\\n\\n\\\/\\\/ A first scan, so the dashboard has something to show.\\n\\\\Onehop\\\\RedirectChecker\\\\Includes\\\\Scanner::run( 'manual' );\\n\"}]}"}},"all_blocks":[],"tagged_versions":["1.0.0","1.1.0"],"block_files":[],"assets_screenshots":{"screenshot-1.png":{"filename":"screenshot-1.png","revision":3804959,"resolution":"1","location":"assets","locale":"","width":1512,"height":738},"screenshot-2.png":{"filename":"screenshot-2.png","revision":3804959,"resolution":"2","location":"assets","locale":"","width":1512,"height":738},"screenshot-3.png":{"filename":"screenshot-3.png","revision":3804959,"resolution":"3","location":"assets","locale":"","width":1512,"height":738},"screenshot-4.png":{"filename":"screenshot-4.png","revision":3804959,"resolution":"4","location":"assets","locale":"","width":1665,"height":950},"screenshot-5.png":{"filename":"screenshot-5.png","revision":3804959,"resolution":"5","location":"assets","locale":"","width":1665,"height":950},"screenshot-6.png":{"filename":"screenshot-6.png","revision":3804959,"resolution":"6","location":"assets","locale":"","width":1512,"height":738}},"screenshots":{"1":"The dashboard: health score, issues per type and their trend.","2":"An issue with its full redirect path and the plugin behind every hop.","3":"Scan history and the schedule and retention settings.","4":"The dashboard in every colour scheme: light, dark, and both with more contrast.","5":"The charts in every colour scheme.","6":"Leftover rules of an inactive plugin: review them, migrate them into an active plugin, or delete them."}},"plugin_section":[262246],"plugin_tags":[932,293116,18182,726,186],"plugin_category":[55],"plugin_contributors":[273608],"plugin_business_model":[],"class_list":["post-405945","plugin","type-plugin","status-publish","hentry","plugin_section-dashboard-widgets","plugin_tags-932","plugin_tags-redirect-chain","plugin_tags-redirect-loop","plugin_tags-redirects","plugin_tags-seo","plugin_category-seo-and-marketing","plugin_contributors-paulacato","plugin_committers-paulacato","plugin_support_reps-paulacato"],"banners":{"banner":"https:\/\/ps.w.org\/onehop-redirect-checker\/assets\/banner-772x250.png?rev=3804959","banner_2x":"https:\/\/ps.w.org\/onehop-redirect-checker\/assets\/banner-1544x500.png?rev=3804959","banner_rtl":false,"banner_2x_rtl":false},"icons":{"svg":false,"icon":"https:\/\/ps.w.org\/onehop-redirect-checker\/assets\/icon-128x128.png?rev=3804959","icon_2x":"https:\/\/ps.w.org\/onehop-redirect-checker\/assets\/icon-256x256.png?rev=3804959","generated":false},"screenshots":[{"src":"https:\/\/ps.w.org\/onehop-redirect-checker\/assets\/screenshot-1.png?rev=3804959","caption":"The dashboard: health score, issues per type and their trend."},{"src":"https:\/\/ps.w.org\/onehop-redirect-checker\/assets\/screenshot-2.png?rev=3804959","caption":"An issue with its full redirect path and the plugin behind every hop."},{"src":"https:\/\/ps.w.org\/onehop-redirect-checker\/assets\/screenshot-3.png?rev=3804959","caption":"Scan history and the schedule and retention settings."},{"src":"https:\/\/ps.w.org\/onehop-redirect-checker\/assets\/screenshot-4.png?rev=3804959","caption":"The dashboard in every colour scheme: light, dark, and both with more contrast."},{"src":"https:\/\/ps.w.org\/onehop-redirect-checker\/assets\/screenshot-5.png?rev=3804959","caption":"The charts in every colour scheme."},{"src":"https:\/\/ps.w.org\/onehop-redirect-checker\/assets\/screenshot-6.png?rev=3804959","caption":"Leftover rules of an inactive plugin: review them, migrate them into an active plugin, or delete them."}],"raw_content":"<!--section=description-->\n<p>Redirects pile up. A site that changed redirect plugins once or twice, or runs an SEO plugin next to a redirect plugin, ends up with rules that send visitors from A to B to C, rules that send them in circles, and rules that do nothing at all. Each plugin only knows its own rules, so none of them can see that its rule and another plugin's rule together form a loop.<\/p>\n\n<p>Onehop Redirect Checker reads the rules of all supported redirect plugins, merges them into one graph and follows every rule to where it really ends.<\/p>\n\n<h4>What it finds<\/h4>\n\n<ul>\n<li><strong>Loops<\/strong>: including loops that run through several plugins (one plugin sends A to B, another sends B back to A).<\/li>\n<li><strong>Chains<\/strong>: two or more hops before a page loads, with a suggestion to point the first URL straight at the final one.<\/li>\n<li><strong>Conflicts<\/strong>: the same URL redirected to different targets by different rules.<\/li>\n<li><strong>Duplicates<\/strong>: the same redirect defined twice.<\/li>\n<li><strong>Self-redirects<\/strong>: source and target are the same URL (up to case, trailing slash or encoding).<\/li>\n<li><strong>Redundant rules<\/strong>: WordPress already redirects the old slug of a post.<\/li>\n<li><strong>Hidden content<\/strong>: a redirect on the URL of a published post or page.<\/li>\n<li><strong>Broken targets<\/strong>: a final target that matches no post, page or term.<\/li>\n<li><strong>Invalid patterns<\/strong>: regular expressions that never match.<\/li>\n<\/ul>\n\n<p>Regex and wildcard rules are followed too.<\/p>\n\n<h4>Supported redirect plugins<\/h4>\n\n<ul>\n<li>Redirection<\/li>\n<li>Yoast SEO Premium (redirect manager)<\/li>\n<li>Rank Math SEO (redirections module)<\/li>\n<li>Safe Redirect Manager<\/li>\n<li>Simple 301 Redirects<\/li>\n<li>301 Redirects \u2013 Redirect Manager<\/li>\n<li>SEOPress (the redirect set on a post)<\/li>\n<li>Slim SEO (redirection module)<\/li>\n<li>SmartCrawl (URL redirection)<\/li>\n<li>The SEO Framework (the 301 redirect set on a post)<\/li>\n<\/ul>\n\n<p>Onehop Redirect Checker is not affiliated with or endorsed by any of these plugins or their authors. Other plugins can be added through the <code>onehop_redirect_checker_sources<\/code> filter.<\/p>\n\n<h4>Dashboard<\/h4>\n\n<p>Under Tools \u2192 Onehop Redirect Checker:<\/p>\n\n<ul>\n<li>A health score, issues per type and their trend.<\/li>\n<li>Charts of the health score and of issues by severity over time.<\/li>\n<li>A searchable, filterable list of issues, each showing the full redirect path and which plugin owns every hop. Search with plain text or, with the .* switch, a regular expression (such as <code>^\/blog\/<\/code>). When a scan finds nothing, an \"All clear\" overview shows the checks it passed.<\/li>\n<li><strong>Verify live<\/strong>: follows the real redirects of an issue over HTTP, on your own site only, to confirm what visitors get.<\/li>\n<li><strong>Apply fix<\/strong>: only where the fix is clear-cut. A chain is shortened by pointing its first rule at the final URL; a duplicate, self-redirect, redundant rule or rule hiding content is switched off. You confirm each change first.<\/li>\n<li><strong>Leftover redirects<\/strong>: a redirect plugin that is no longer active but still holds rules is detected. Review its rules in a dialog, then migrate them into an active redirect plugin, delete single rules, or delete all of its data (and, for plugins with their own tables, the tables). Regex, wildcard and prefix rules are migrated as they are where the other plugin supports them; into a plugin that only holds exact rules (Simple 301 Redirects, 301 Redirects), they are copied as exact rules for the URLs your site is known to have: published content, the sources and targets of other rules, and URLs from Redirection's 404 log. Only plain paths become rules (no spaces, control characters, markup or <code>*<\/code>), and what is migrated is exactly what the dialog listed: if anything changed meanwhile, you are asked to review it again. On a multisite network, only a network administrator can drop another plugin's tables.<\/li>\n<li><strong>Scan history<\/strong> with a date picker (limited to the days that have scans) and sortable columns.<\/li>\n<li><strong>Scheduled scans<\/strong>: daily, weekly (on the weekdays you pick) or monthly (on a day of the month or the last day), at the hours you pick, in the site's timezone.<\/li>\n<li><strong>Retention<\/strong>: keep scans for a number of days, or keep only the newest number of scans. Old scans are removed every Sunday around 03:00 (and right after every scan when you keep a number of scans).<\/li>\n<li><strong>Quick walkthrough<\/strong>: a short tour of the dashboard on your first visit, started from a pointer on the Tools menu. After an update that adds features, each administrator gets a walkthrough of only what is new. Show it again any time from the bottom of the dashboard.<\/li>\n<li><strong>Working together<\/strong>: when other administrators have the dashboard open, you see who; when one of them (or a scheduled scan, WP-CLI or an AI client) changes something, your dashboard updates within about 15 seconds and says what happened. Settings you are editing are never overwritten.<\/li>\n<\/ul>\n\n<p>Dates and times follow the site's date and time formats, timezone and language. When your computer runs on another timezone than the site, scheduled times also show your own clock. The dashboard follows your system's light or dark mode and its contrast preference, and was checked against WCAG 2.2 AA in all of them.<\/p>\n\n<h4>From WP-CLI<\/h4>\n\n<ul>\n<li><code>wp onehop-redirect-checker scan [--format=table|json|summary]<\/code> runs a scan and prints the issues.<\/li>\n<li><code>wp onehop-redirect-checker scan --porcelain --fail-on=loop,conflict<\/code> prints only the health score and exits with code 1 when loops or conflicts exist, so a deploy pipeline can stop on them (<code>--fail-on=any<\/code> for every type).<\/li>\n<li><code>wp onehop-redirect-checker purge-logs [--all]<\/code> removes old scan history.<\/li>\n<\/ul>\n\n<h4>Abilities (WordPress 7.1+)<\/h4>\n\n<p>Four abilities for the WordPress Abilities API, so AI clients connected through the MCP adapter can work with Onehop Redirect Checker for administrators (<code>manage_options<\/code>):<\/p>\n\n<ul>\n<li><code>onehop-redirect-checker\/run-scan<\/code>: runs a scan and returns the health score, counts per type and severity, and the most severe issues with their redirect path and a suggested fix.<\/li>\n<li><code>onehop-redirect-checker\/get-scan-results<\/code>: the same for the latest scan, without running a new one; optionally filtered by issue type.<\/li>\n<li><code>onehop-redirect-checker\/get-next-scan<\/code>: when the next scheduled scan runs, the schedule, and the retention policy.<\/li>\n<li><code>onehop-redirect-checker\/flush-logs<\/code>: asks to delete the scan history, the change log or both. An AI client can't delete anything with it: with <code>confirm: true<\/code> it files a request, and the logs are only deleted when an administrator approves that request on the dashboard (Tools \u2192 Onehop Redirect Checker). Requests expire after an hour.<\/li>\n<\/ul>\n\n<p>They never return user data (e-mail addresses in rule strings are masked) and never change a redirect rule. They are not exposed on the abilities REST API.<\/p>\n\n<h4>Changing other plugins' rules<\/h4>\n\n<p>Onehop Redirect Checker only reads other plugins' rules, except when you choose <strong>Apply fix<\/strong>, <strong>Migrate<\/strong> or <strong>Delete<\/strong> for leftover rules:<\/p>\n\n<ul>\n<li>Before a fix is applied, the rule is read again; if it changed since the scan, nothing is changed.<\/li>\n<li>Rules are switched off where the plugin supports that (Redirection, Rank Math, Safe Redirect Manager, 301 Redirects, SEOPress, Slim SEO), so they can be switched back on there. Yoast SEO Premium, Simple 301 Redirects, SmartCrawl and The SEO Framework have no \"off\" state; there the rule is removed.<\/li>\n<li>Only plain URLs and paths are ever written into another plugin's storage.<\/li>\n<li>Migrating copies rules; the inactive plugin's data is left as it is until you delete it. A pattern copied as exact rules covers the URLs listed in the dialog, not URLs your site has never seen.<\/li>\n<li>Leftover data can only be deleted while its plugin is not active.<\/li>\n<li>Every change is written to a log with the rule before and after. One change runs at a time, never during a scan.<\/li>\n<\/ul>\n\n<h4>Privacy<\/h4>\n\n<p>Onehop Redirect Checker does not contact any external service. The live check only requests URLs on your own site. Scan history and the change log are stored in your site's database, are kept for the period you set (90 days by default). Deleting the plugin removes everything it stored, on every site of a network: its tables, settings, scheduled events and the walkthrough progress per user. Redirect rules it changed or migrated in other plugins belong to those plugins and stay.<\/p>\n\n<h4>On multisite<\/h4>\n\n<p>Each site has its own dashboard, history and schedule. Network administrators get an overview of the latest scan of every site under Network Admin \u2192 Settings \u2192 Onehop Redirect Checker.<\/p>\n\n<h4>Source code<\/h4>\n\n<p>The dashboard is built with React and TypeScript. Its sources and build configuration are included in the plugin (<code>assets\/<\/code>, <code>package.json<\/code>, <code>package-lock.json<\/code>, <code>vite.config.ts<\/code>, <code>tsconfig.json<\/code>), and the code is on GitHub: https:\/\/github.com\/paulAcato\/onehop-redirect-checker<\/p>\n\n<p>To rebuild <code>dist\/<\/code> from the plugin folder with Node 24 or newer: <code>npm ci<\/code>, then <code>npm run build<\/code>. The built file is not minified, so it stays readable.<\/p>\n\n<!--section=installation-->\n<ol>\n<li>Install and activate the plugin.<\/li>\n<li>Go to Tools \u2192 Onehop Redirect Checker and choose Run scan.<\/li>\n<\/ol>\n\n<!--section=faq-->\n<dl>\n<dt id=\"does%20it%20change%20my%20redirects%20on%20its%20own%3F\"><h3>Does it change my redirects on its own?<\/h3><\/dt>\n<dd><p>No. Scans only read. Rules change only when you choose Apply fix or Migrate and confirm it.<\/p><\/dd>\n<dt id=\"why%20does%20a%20loop%20have%20no%20apply%20fix%20button%3F\"><h3>Why does a loop have no Apply fix button?<\/h3><\/dt>\n<dd><p>Breaking a loop means choosing which rule is wrong, and only you know that. Fixes are offered only where there is one clear answer.<\/p><\/dd>\n<dt id=\"can%20i%20undo%20a%20fix%3F\"><h3>Can I undo a fix?<\/h3><\/dt>\n<dd><p>Switched-off rules can be switched back on in the plugin that owns them. For removed rules (Yoast SEO Premium, Simple 301 Redirects), the old rule is in the change log.<\/p><\/dd>\n<dt id=\"does%20the%20live%20check%20slow%20down%20my%20site%3F\"><h3>Does the live check slow down my site?<\/h3><\/dt>\n<dd><p>It requests at most 20 URLs per check, one at a time, with a 5-second timeout, only when you click it. Your redirect plugin may count these requests as hits.<\/p><\/dd>\n<dt id=\"my%20scheduled%20scan%20did%20not%20run%20at%20the%20time%20i%20expected.\"><h3>My scheduled scan did not run at the time I expected.<\/h3><\/dt>\n<dd><p>Scheduled scans run in the site's timezone (Settings \u2192 General), not your computer's: the dashboard shows both when they differ. WordPress also only runs scheduled tasks when the site gets a visit; on a quiet site, set up a real cron job that calls wp-cron.php.<\/p><\/dd>\n<dt id=\"why%20are%20smartcrawl%27s%20rules%20listed%20as%20leftovers%20while%20smartcrawl%20is%20active%3F\"><h3>Why are SmartCrawl's rules listed as leftovers while SmartCrawl is active?<\/h3><\/dt>\n<dd><p>They are not: rules of an active plugin are never leftovers. When SmartCrawl's URL Redirection module (or Rank Math's or Slim SEO's redirect feature) is switched off, its rules redirect nothing and are left out of the scan.<\/p><\/dd>\n<dt id=\"my%20site%20has%20thousands%20of%20redirects.\"><h3>My site has thousands of redirects.<\/h3><\/dt>\n<dd><p>Rules are read in batches and analysed within a time budget. If a scan reaches the budget, it is marked as partial.<\/p><\/dd>\n\n<\/dl>\n\n<!--section=changelog-->\n<h4>1.1.0<\/h4>\n\n<ul>\n<li>New: a Dashboard widget with the health score, the last scan date and a tile per issue type, each with its change since the last scan and a trend line. A tile opens that type in the issue list.<\/li>\n<li>The widget shows for administrators and for roles your SEO or redirect plugin lets manage its settings or redirects (Yoast SEO, Rank Math, SEOPress, Redirection, Safe Redirect Manager, The SEO Framework). Add more with the <code>onehop_redirect_checker_widget_capabilities<\/code> filter.<\/li>\n<li>New: activating the plugin runs a first scan in the background, so the dashboard and widget have results straight away.<\/li>\n<li>New: a month after you install the plugin (or update to 1.1.0), administrators are asked once, on the Dashboard and the plugin's screen, whether they would rate it on WordPress.org. \"Maybe later\" asks again a month later; \"Don't ask again\" means never.<\/li>\n<li>Fix: the dashboard no longer scrolls sideways on phones.<\/li>\n<li>Fix: on phones the walkthrough fits the screen, and the pointer to it sits at the bottom of the screen.<\/li>\n<\/ul>\n\n<h4>1.0.0<\/h4>\n\n<ul>\n<li>First release: reads redirects from ten SEO and redirect plugins and finds loops, chains, conflicts, duplicates, self-redirects, redundant and hidden-content rules, broken targets and invalid patterns.<\/li>\n<li>Verify live, Apply fix, leftover detection with migration (patterns as exact rules where needed) and deletion, scheduled scans, retention by days or by number of scans.<\/li>\n<li>Regex search in the issue list, a versioned walkthrough, and live updates when other administrators change something.<\/li>\n<li>Log deletions requested by AI clients need an administrator's approval in wp-admin.<\/li>\n<li>WP-CLI commands and four abilities for the WordPress Abilities API.<\/li>\n<\/ul>","raw_excerpt":"Finds redirect loops, chains and redirects you don't need, across every redirect plugin on the site at once, and fixes the clear-cut ones.","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin\/405945","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin"}],"about":[{"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/types\/plugin"}],"replies":[{"embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/comments?post=405945"}],"author":[{"embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wporg\/v1\/users\/paulacato"}],"wp:attachment":[{"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/media?parent=405945"}],"wp:term":[{"taxonomy":"plugin_section","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_section?post=405945"},{"taxonomy":"plugin_tags","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_tags?post=405945"},{"taxonomy":"plugin_category","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_category?post=405945"},{"taxonomy":"plugin_contributors","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_contributors?post=405945"},{"taxonomy":"plugin_business_model","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_business_model?post=405945"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}