Skip to content

Plugin Sumission: Provide a button to let the user plugin check before submitting#718

Open
akirk wants to merge 3 commits into
WordPress:trunkfrom
akirk:plugin-check-before-submit
Open

Plugin Sumission: Provide a button to let the user plugin check before submitting#718
akirk wants to merge 3 commits into
WordPress:trunkfrom
akirk:plugin-check-before-submit

Conversation

@akirk

@akirk akirk commented Jul 17, 2026

Copy link
Copy Markdown
Member

Summary

Adds a button Test with Plugin Check in Playground step to the plugin upload form to make it easier for plugin developers to confirm their plugin passes Plugin Check before submitting.

I believe Plugin Check is available after submission already, a reason for this implementation might have been so that the plugin file is available as a hosted ZIP somewhere. This avoids this by using the Playground API Client.

plugin-submission-inline-plugin-check.mp4

What this adds

  • A Plugin Check button that appears once a zip is selected.
  • Clicking it boots WordPress Playground in an inline iframe (via @wp-playground/client), installs plugin-check from wordpress.org, and installs the selected local zip as literal bytes without uploading anything yet.
  • Playground lands on the Plugin Check admin screen with the uploaded preselected; the developer clicks "Check it!" to run the checks.

How it works

  • The zip is read client-side (File.arrayBuffer()) and passed to the blueprint as a literal resource, so the file doesn'd need to be uploaded.
  • After Playground has booted, we use run to execute PHP code in Playground to determine the plugin basename.
  • Then we navigate to the Plugin Check Admin page and pre-select the plugin.

Files changed

  • plugin-directory/shortcodes/class-upload.php — preview UI in the upload form.
  • wporg-plugins-2024/js/upload.js — Playground handling

Notes / follow-ups

  • In this state it is purely advisory and client-side; it complements, not replaces, server-side checks. The existing post-submission flow is unchanged.
  • Plugin Check's static checks are the reliable subset under WASM PHP; runtime checks would need further validation.
  • Possible follow-up: wire the completed run to the "tested with Plugin Check" confirmation checkbox.

@github-actions

github-actions Bot commented Jul 17, 2026

Copy link
Copy Markdown

The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the props-bot label.

Core Committers: Use this line as a base for the props when committing in SVN:

Props akirk, obenland.

To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook.

@akirk
akirk force-pushed the plugin-check-before-submit branch from cce9f16 to 5e39953 Compare July 17, 2026 09:41
@akirk
akirk requested review from Copilot and obenland July 17, 2026 09:45

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds an optional, client-side “Test with Plugin Check in Playground” flow to the plugin upload form, allowing authors to run Plugin Check against the selected ZIP in an embedded WordPress Playground before submitting to WordPress.org.

Changes:

  • Adds upload-form UI to reveal a “Test with Plugin Check in Playground” button once a ZIP is selected.
  • Implements client-side ZIP loading and bootstraps an embedded Playground session that installs Plugin Check plus the selected ZIP, then navigates to the Plugin Check screen and attempts best-effort plugin preselection.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 4 comments.

File Description
wordpress.org/public_html/wp-content/themes/pub/wporg-plugins-2024/js/upload.js Adds Playground boot + ZIP-to-blueprint wiring and UI behavior for the pre-submission Plugin Check preview.
wordpress.org/public_html/wp-content/plugins/plugin-directory/shortcodes/class-upload.php Adds the button/preview container markup to the plugin upload form.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread wordpress.org/public_html/wp-content/themes/pub/wporg-plugins-2024/js/upload.js Outdated
Comment thread wordpress.org/public_html/wp-content/themes/pub/wporg-plugins-2024/js/upload.js Outdated
akirk and others added 2 commits July 17, 2026 11:49
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
@obenland

Copy link
Copy Markdown
Member

It's a fun experiment and I'm delighted this is possible, but I think the plugin check that's built into the upload is probably good enough for now and provides a smoother user experience.

I'm unfamiliar with the exact toll it takes to run Plugin Check there, @dd32 asked me to make sure plugin developers run it locally when using the WP.org MCP, so maybe it's worthwhile to check if that backend run could be moved to playground? Not sure.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants