Plugin Sumission: Provide a button to let the user plugin check before submitting#718
Plugin Sumission: Provide a button to let the user plugin check before submitting#718akirk wants to merge 3 commits into
Conversation
|
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 Core Committers: Use this line as a base for the props when committing in SVN: To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
cce9f16 to
5e39953
Compare
There was a problem hiding this comment.
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.
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
|
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. |
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
@wp-playground/client), installsplugin-checkfrom wordpress.org, and installs the selected local zip as literal bytes without uploading anything yet.How it works
File.arrayBuffer()) and passed to the blueprint as aliteralresource, so the file doesn'd need to be uploaded.runto execute PHP code in Playground to determine the plugin basename.Files changed
plugin-directory/shortcodes/class-upload.php— preview UI in the upload form.wporg-plugins-2024/js/upload.js— Playground handlingNotes / follow-ups