| 开发者 | npc01 |
|---|---|
| 更新时间 | 2026年10月24日 11:17 |
| PHP版本: | 7.4 及以上 |
| WordPress版本: | 7.1 |
| 版权: | GPLv2 or later |
| 版权网址: | 版权信息 |
/wp-content/plugins/ or install it via Plugins → Add New in the admin.NPCMI_API_KEY in wp-config.php to enable the AI report feature (see FAQ).No. AI report is optional and disabled by default. To enable it, add this line above /* That's all, stop editing! */ in your wp-config.php:
define( 'NPCMI_API_KEY', 'sk-ant-xxxx' );
Without that constant the plugin still runs all 9 diagnostics, scheduled checks, email notifications, and history.
Diagnosis results are sent only by the optional AI report feature, only to the Anthropic Claude API, and only when explicitly triggered (manual "Generate AI Report" button, or automatic generation when a scheduled check detects a critical issue). The File Integrity check itself downloads the official checksums for your WordPress version from WordPress.org (it sends the WordPress version and locale; as with every request WordPress makes, the user agent includes your site URL; no files or diagnosis results are sent). The update checks use WordPress core's own update check. See the External services section below for details.
Only the user who activated it. The user ID/email and the site URL are recorded on first activation, and the plugin refuses to operate for other users or on a different domain. This is a deliberate constraint to keep the AI cost surface and the admin actions tied to a specific operator.
This plugin was initially built for Japanese-speaking WordPress maintainers. The AI prompt instructs Claude to reply in Japanese. We will localize the prompt for additional output languages in a future release.
Not automatically. The detector tries to whitelist known legitimate plugin files (Ajax Load More templates, WP STAGING index.php, AIOS firewall rules, etc.). Anything that still appears in the warning should be opened and inspected first — many backup/staging/security plugins legitimately drop PHP files there.
uploads/updraft/ are treated as plugin files only when they contain nothing but comments, or start with a recognised stop statement such as exit;. The comment check removed single-line comments up to the end of the line, but in PHP a single-line comment ends at the closing tag (and at a carriage return). A file with a "Silence is golden" comment followed by a closing tag and a second PHP block was treated as comments only, so the code in the second block was never reported. The check now uses PHP's own tokenizer. When the tokenizer extension is not available, a character-by-character scanner that follows the same rules is used instead of regular expressions. #[...] lines are no longer treated as comments, because they are attributes (code) on PHP 8.if ( ! defined( 'ABSPATH' ) ) guard was accepted when the guard only began with "exit" or "die", such as a call to a function named exitnow() or exit( print( ... ) ). The guard must now be a plain exit; / die;, optionally with a literal message: a single-quoted string, or a double-quoted string without $ (a double-quoted string can run code inside {$...}).update_available and unknown, a File Integrity result whose differences were all in files known to differ was passed to the AI as a warning while the card and the grade showed OK, and the history list showed the grade saved at the time while the latest result was re-evaluated.languages/npc-maintenance-inspector-ja-npc-maintenance-inspector-admin.json) was missing, so the Japanese admin screen showed the JavaScript texts in English. Three untranslated texts around the debug.log backup are now translated as well.checked_files used to be the number of entries in the WordPress.org checksum list, not the number of files compared, and target files that were missing on the site were skipped silently. A site where none of the target files could be read was still reported as "OK". checked_files is now the number of files actually read and compared. Files outside the check scope (excluded_count) and target files that are missing or unreadable (failed_files / failed_count) are reported separately.unscanned_count, and the result is not downgraded to OK.unreadable_files / unreadable_dirs) and keep the result at warning. Previously an unreadable folder stopped the whole diagnosis with an exception. If the uploads directory cannot be found, the result is a warning instead of OK. The number of readable PHP files that were examined is reported as scanned_count.'test' => 'wordpress_version') which the caller resolves to a get_test_{$key}() method, so checking only is_callable() silently skipped all 22 core direct tests. Only tests added by other plugins were being counted.wp_site_health_test_result filter, matching core behaviour.claude-sonnet-4-6 (the previous claude-sonnet-4-20250514 will be retired by Anthropic on 2026-06-15).npc-wp-healthcheck 0.7.8 series).NPCMI_API_KEY).