diff --git a/includes/Checker/Checks/Plugin_Repo/Plugin_Header_Fields_Check.php b/includes/Checker/Checks/Plugin_Repo/Plugin_Header_Fields_Check.php index 2ec651898..3694ea721 100644 --- a/includes/Checker/Checks/Plugin_Repo/Plugin_Header_Fields_Check.php +++ b/includes/Checker/Checks/Plugin_Repo/Plugin_Header_Fields_Check.php @@ -223,29 +223,6 @@ public function run( Check_Result $result ) { } } - if ( ! empty( $plugin_header['PluginURI'] ) && ! empty( $plugin_header['AuthorURI'] ) ) { - $plugin_uri = rtrim( strtolower( $plugin_header['PluginURI'] ), '/' ); - $author_uri = rtrim( strtolower( $plugin_header['AuthorURI'] ), '/' ); - - if ( $plugin_uri === $author_uri ) { - $this->add_result_error_for_file( - $result, - sprintf( - /* translators: 1: plugin uri header field, 2: author uri header field */ - __( 'The "%1$s" and "%2$s" header in the plugin file must be different. It is not required to provide both, so pick the one that best applies to your situation.', 'plugin-check' ), - esc_html( $labels['PluginURI'] ), - esc_html( $labels['AuthorURI'] ) - ), - 'plugin_header_same_plugin_author_uri', - $plugin_main_file, - 0, - 0, - __( 'https://developer.wordpress.org/plugins/plugin-basics/header-requirements/', 'plugin-check' ), - 7 - ); - } - } - if ( ! empty( $plugin_header['Network'] ) ) { if ( 'true' !== strtolower( $plugin_header['Network'] ) ) { $this->add_result_warning_for_file( diff --git a/tests/phpunit/testdata/plugins/test-plugin-late-escaping-errors/load.php b/tests/phpunit/testdata/plugins/test-plugin-late-escaping-errors/load.php index d524bcddc..a777dd97f 100644 --- a/tests/phpunit/testdata/plugins/test-plugin-late-escaping-errors/load.php +++ b/tests/phpunit/testdata/plugins/test-plugin-late-escaping-errors/load.php @@ -6,7 +6,7 @@ * Requires PHP: 5.6 * Version: 1.0.0 Beta * Author: WordPress Performance Team - * Author URI: https://github.com/wordpress/plugin-check/ + * Author URI: https://make.wordpress.org/performance/ * License: GPLv2 or later * License URI: https://www.gnu.org/licenses/old-licenses/gpl-2.0.html * Text Domain: test-plugin-check-errors diff --git a/tests/phpunit/tests/Checker/Checks/Plugin_Header_Fields_Check_Tests.php b/tests/phpunit/tests/Checker/Checks/Plugin_Header_Fields_Check_Tests.php index b82067972..b55799b10 100644 --- a/tests/phpunit/tests/Checker/Checks/Plugin_Header_Fields_Check_Tests.php +++ b/tests/phpunit/tests/Checker/Checks/Plugin_Header_Fields_Check_Tests.php @@ -88,6 +88,5 @@ public function test_run_with_invalid_header_fields() { $this->assertCount( 1, wp_list_filter( $errors['load.php'][0][0], array( 'code' => 'plugin_header_missing_plugin_description' ) ) ); $this->assertCount( 1, wp_list_filter( $errors['load.php'][0][0], array( 'code' => 'plugin_header_invalid_plugin_version' ) ) ); - $this->assertCount( 1, wp_list_filter( $errors['load.php'][0][0], array( 'code' => 'plugin_header_same_plugin_author_uri' ) ) ); } }