Making WordPress.org

Opened 8 months ago

Last modified 6 months ago

#7556 new enhancement

Run PCP function to test plugin in plugin submission process

Reported by: barrykooij's profile barrykooij Owned by:
Milestone: Priority: normal
Component: Plugin Directory Keywords:
Cc:

Description

When a user submits a new plugin to the directory, we want to run a function within PCP which checks if the new submission passes a collection of automated checks. If not, we want to block the submission and inform the user why.

The first version within PCP would be a set of PHPCS rules that are always blocking. Later we can expand on this with for example a readme parser. We are discussing what PHPCS rules should be included on Github: https://github.com/WordPress/plugin-check/issues/440

This trac ticket is to talk about if this is possible and how we can do this.

Change History (4)

#1 @dd32
8 months ago

To integrate it...

The minimum we need to know is:

  • Whether this plugin is a PASS or FAIL.
  • Any errors/warnings/notes etc.

A pass with a long list of errors is acceptable, if those errors might be false-positives, as long as we have a way of knowing that it's a PASS/FAIL.

What we need code wise:

  • A function (or class method, or even WP-CLI command!) that can be provided an arbritrary folder on disk (ie. /tmp/plugin-submission-123oeiwlsf), any metadata about the plugin needed (ie. WordPress.org uploader name), and can return the above information.

#2 follow-up: @davidperez
6 months ago

Hello! Could you give us more detail of the output that plugin will make? An array? json? etc? We actually have a WP CLI and we could make a Class as well. Could you give us what is more convenient for you?

#3 in reply to: ↑ 2 @barrykooij
6 months ago

Replying to davidperez:

Hello! Could you give us more detail of the output that plugin will make? An array? json? etc? We actually have a WP CLI and we could make a Class as well. Could you give us what is more convenient for you?

Hey David. This is clear on our end. We will create a function that can be called within meta. This will return a bool (PASS/FAIL) and an array with "results"(strings) (Any errors/warnings/notes etc.)

Last edited 6 months ago by barrykooij (previous) (diff)

#4 @davidperez
6 months ago

Ok @barrykooij . Thanks for the clarification.

Note: See TracTickets for help on using tickets.