Skip to content

Surface checks that failed to run - #1457

Open
sanketio wants to merge 1 commit into
WordPress:trunkfrom
sanketio:fix/1445-surface-failed-checks
Open

Surface checks that failed to run#1457
sanketio wants to merge 1 commit into
WordPress:trunkfrom
sanketio:fix/1445-surface-failed-checks

Conversation

@sanketio

@sanketio sanketio commented Aug 31, 2026

Copy link
Copy Markdown

A failed check request is no longer swallowed: the completion notice names the checks that did not run, instead of reporting "No errors found".

  • /wp-admin/tools.php?page=plugin-check — Performance category on an active plugin: notice lists the five runtime checks whose requests return 400
  • Same screen, Plugin Repo category: unchanged, reports the error/warning counts
  • npm run lint-js

Part of #1445.

Open WordPress Playground Preview

@github-actions

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.

If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message.

Co-authored-by: sanketio <sanketparmar@git.wordpress.org>

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

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟢 Approval recommended

The change is small, localized to admin UI messaging, and addresses the reported false-positive completion state without introducing risky behavior.

Pull request overview

This PR updates the Plugin Check admin UI completion notice so that when one or more check AJAX requests fail (e.g., returning a non-JSON 0 response), the final notice explicitly lists the checks that did not complete instead of incorrectly implying a clean pass.

Changes:

  • Adds a localized “failed checks” message string to the admin page script data.
  • Tracks check slugs whose runCheck request fails and surfaces them in the final results notice (forcing error severity when present).
File summaries
File Description
includes/Admin/Admin_Page.php Adds a translated message template for listing checks that could not be completed.
assets/js/plugin-check-admin.js Collects failed check slugs and appends them to the completion notice so “No errors found” is not shown on partial/incomplete runs.
Review details
  • Files reviewed: 2/2 changed files
  • Comments generated: 3
  • Review effort level: Lite

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment on lines 815 to 817
} catch {
// Ignore for now.
failedChecks.push( checks[ i ] );
}
Comment on lines +841 to +844
* @param {string} template The translated format string.
* @param {...string} args Replacement values.
* @return {string} Formatted string with placeholders replaced.
*/
Comment on lines 858 to +860
* @param {boolean} isSuccessMessage Whether the message is a success message.
* @param {Object} aiStats AI statistics.
* @param {Array} failedChecks Slugs of checks whose request did not complete.
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.

2 participants