Skip to content

Plugin Directory: Improve update-scan author email content and enable Plugin Check update mode#610

Open
davidperezgar wants to merge 7 commits intoWordPress:trunkfrom
davidperezgar:activate-email-scanner
Open

Plugin Directory: Improve update-scan author email content and enable Plugin Check update mode#610
davidperezgar wants to merge 7 commits intoWordPress:trunkfrom
davidperezgar:activate-email-scanner

Conversation

@davidperezgar
Copy link
Copy Markdown
Member

Summary

This PR updates the plugin update-scan notification flow to improve author communication and ensure Plugin Check runs in the correct mode for updated plugins.

Changes included

  1. Enable Plugin Check update mode in the scanner command

    • In Plugin_Updates_PCP::run_plugin_check(), the CLI call now passes:
    • --mode=<new|update>
    • File: jobs/class-plugin-updates-pcp.php
  2. Improve the email body sent to plugin committers after update scans

    • Added an introduction explaining the plugin was automatically scanned after an update and issues were found.
    • Added a clear non-reply notice.
    • Added guidance to install/use Plugin Check with link:
      • https://wordpress.org/plugins/plugin-check/
    • Added a closing thank-you line.
    • File: jobs/class-plugin-updates-pcp.php
  3. Add local preview utility for scanner emails

    • New script: bin/preview-plugin-scan-email.php
    • Allows previewing subject/body/headers from scan data (without sending by default), with optional --send mode for manual testing.

Why

  • Authors now get clearer guidance and expectations when issues are detected.
  • Scanner behavior aligns with update context via --mode=update.
  • The preview utility reduces risk when iterating on email wording/format.

Files changed

  • wordpress.org/public_html/wp-content/plugins/plugin-directory/jobs/class-plugin-updates-pcp.php
  • wordpress.org/public_html/wp-content/plugins/plugin-directory/bin/preview-plugin-scan-email.php

Verification

  • php -l jobs/class-plugin-updates-pcp.php
  • php -l bin/preview-plugin-scan-email.php

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Apr 17, 2026

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 davidperez, dd32.

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

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR updates the plugin update-scan flow in the Plugin Directory to (1) run Plugin Check in update mode for updated plugins and (2) improve the wording/content of the notification email sent to plugin committers. It also adds a CLI utility to preview (and optionally send) the scan notification email locally.

Changes:

  • Pass --mode=<new|update> to the Plugin Check WP-CLI invocation so scans can run in update mode.
  • Expand/improve the update-scan email body content (intro, no-reply note, Plugin Check guidance/link, closing line).
  • Add bin/preview-plugin-scan-email.php to preview the email output (and optionally send it).

Reviewed changes

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

File Description
wordpress.org/public_html/wp-content/plugins/plugin-directory/jobs/class-plugin-updates-pcp.php Enables Plugin Check --mode flag and refines committer email messaging for update scans.
wordpress.org/public_html/wp-content/plugins/plugin-directory/bin/preview-plugin-scan-email.php Adds a CLI preview tool for the scan email (preview-by-default, optional live send).

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

Copy link
Copy Markdown
Member

@dd32 dd32 left a comment

Choose a reason for hiding this comment

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

Claude had some re-wording suggestions, that I've included as suggestions here.

The primary one is moving the do-not-reply to the end, as being defensive up front can get off on the wrong foot with some people.

It's probably worthwhile calling PCP a plugin rather than a tool, to point out they install the plugin on a site, not run a stand alone "tool".

As for the bin script, I would probably create a scan-plugin.php and just run the scan, rather than a demo preview. I understand that this was to get the PR up, but a CLI scan command would be helpful.. although I guess plugin-check also has a scan cli command...

…jobs/class-plugin-updates-pcp.php

Co-authored-by: Dion Hulse <dd32@dd32.id.au>
Copilot AI review requested due to automatic review settings April 21, 2026 15:26
…jobs/class-plugin-updates-pcp.php

Co-authored-by: Dion Hulse <dd32@dd32.id.au>
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 1 out of 2 changed files in this pull request and generated 1 comment.


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

Comment on lines +139 to +142
echo "The latest update to your plugin was automatically scanned and some potential issues were flagged for your review.\n\n";
echo "To review these issues in detail, install and run the Plugin Check plugin on your own development site:\n";
echo "https://wordpress.org/plugins/plugin-check/\n\n";

Copy link

Copilot AI Apr 21, 2026

Choose a reason for hiding this comment

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

The PR description mentions adding a non-reply notice and an updated closing line in the author email, but the current notify_plugin_authors() body only adds the new intro + Plugin Check link and retains a single closing line without a non-reply notice. Either update the PR description to match the implemented email copy, or add the missing non-reply/closing text so the behavior matches what’s documented in the PR.

Copilot uses AI. Check for mistakes.
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