WordPress / plugin-check

A repository for the new Plugin Check plugin from the WordPress Performance and Plugins Team.
https://wordpress.org/plugins/plugin-check/
GNU General Public License v2.0
195 stars 39 forks source link

Missing invalid plugin name header check in Readme Check #397

Closed ernilambar closed 5 months ago

ernilambar commented 5 months ago

This is the check implemented in wordpress.org readme validator. It is missing in our Readme Check.

In Readme check, following check is

// Fatal errors.
if ( empty( $readme->name ) || isset( $readme->warnings['invalid_plugin_name_header'] ) ) {
    $errors[] = sprintf(
        /* translators: 1: 'Plugin Name' section title, 2: 'Plugin Name' */
        __( 'We cannot find a plugin name in your readme. Plugin names look like: %1$s. Please change %2$s to reflect the actual name of your plugin.', 'wporg-plugins' ),
        '<code>=== Plugin Name ===</code>',
        '<code>Plugin Name</code>'
    );
}

Ref: https://github.com/WordPress/wordpress.org/blob/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/readme/class-validator.php#L73