Making WordPress.org

Opened 8 years ago

Closed 5 years ago

#2743 closed enhancement (worksforme)

Improvement of New Readme Validator

Reported by: asif2bd's profile Asif2BD Owned by:
Milestone: Priority: normal
Component: Plugin Directory Keywords: needs-patch close
Cc:

Description

Otto explained this validator is still new and could use some improvement, I personally think it needs some basic feature, right now it's just checking if there is a contributor or if there is an upgrade notice. What about formatting proper markdown? Like what if the format is wrong, or the name is too long? Ultimately though validator is not a real-time scanner, still its a good guide for a new developer. They might get the wrong msz about plugin directory best practice.

You can find the current validator code [here](https://meta.trac.wordpress.org/browser/sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/readme)

I propose the following Improvement -

1) Let's show a preview of the entered readme.txt

2) Instead of just checking if a block exist like this

if ( ! count( $readme->contributors ) ) {
	                        /* Translators: Plugin header tag; */
	                        $warnings[] = sprintf( __( 'No %s listed.', 'wporg-plugins' ), '<code>Contributors</code>' );
	                }

We should check the size of a section, is the format is ok, like all the format is closed properly.

3) Give feedbacks like Plugin Name is too wrong, or must have at least one screenshot.

4) Instead of just showing md style format, is it possible to show styles with present Plugin Directory?

This is based on my conversation with @otto42 & @sergey, check this [slack archives](https://wordpress.slack.com/archives/C02QB8GMM/p1492199946799705).

Change History (6)

#1 @Otto42
8 years ago

  • Milestone set to Plugin Directory v3 - Future
  • Priority changed from high to normal

This ticket was mentioned in Slack in #meta by tellyworth. View the logs.


8 years ago

#3 @SergeyBiryukov
7 years ago

Let's show a preview of the entered readme.txt

Related: #2538

#4 @SergeyBiryukov
7 years ago

  • Keywords has-screenshots removed

#5 @tellyworth
6 years ago

  • Keywords close added

Are these suggestions all still relevant, or have some changed? Can someone perhaps describe the needed validations in more detail - for instance, exactly which sections should have what length limits?

#6 @dd32
5 years ago

  • Milestone Plugin Directory v3 - Future deleted
  • Resolution set to worksforme
  • Status changed from new to closed

1) Let's show a preview of the entered readme.txt
4) Instead of just showing md style format, is it possible to show styles with present Plugin Directory?

These seem like the same thing to me. I think we can close as a duplicate of #2538 for those, as it looks like that's the direction that ticket is going in.

2) Instead of just checking if a block exist like this
We should check the size of a section, is the format is ok, like all the format is closed properly.

We've since added extra validation for specific sections of the readme, for example, the Contributors field.
If there's any other sections that need extra validation, specific tickets about specific fields would be preferred.

3) Give feedbacks like Plugin Name is too wrong, or must have at least one screenshot.

Long Plugin Names aren't a problem, if a developer really wants to use a silly long name.. why not?
Screenshots aren't required, but the field can also be skipped from the readme - it's just the caption which is optional.

The fields and sections are documented in the sample readme, I would expect most people to base it off that so I'm not sure we should set off alarms just because they've skipped an entirely optional thing.

Note: See TracTickets for help on using tickets.