diff --git a/includes/Checker/Checks/Plugin_Repo/File_Type_Check.php b/includes/Checker/Checks/Plugin_Repo/File_Type_Check.php index f1e54734..fa4000dc 100644 --- a/includes/Checker/Checks/Plugin_Repo/File_Type_Check.php +++ b/includes/Checker/Checks/Plugin_Repo/File_Type_Check.php @@ -260,6 +260,15 @@ protected function look_for_application_files( Check_Result $result, array $file protected function look_for_badly_named_files( Check_Result $result, array $files ) { $conflict_chars = '!@#$%^&*()+=[]{};:"\'<>,?/\\|`~'; + $plugin_path = $result->plugin()->path(); + + $files = array_map( + function ( $file ) use ( $plugin_path ) { + return substr( $file, strlen( $plugin_path ) ); + }, + $files + ); + foreach ( $files as $file ) { $badly_name = false; if ( preg_match( '/\s/', $file ) ) {