Description
NPC Maintenance Inspector performs 9-point health diagnostics on your WordPress site directly from the admin dashboard:
- WordPress core updates — Detect missing core updates.
- Plugin updates — List plugins with available updates.
- Site Health issues — Extract critical issues from WP standard Site Health API.
- PHP version — Check whether a newer security release of the server’s PHP branch is out, and whether the branch still receives official security fixes (both from php.net).
- Error log analysis — Summarize debug.log entries and save a one-click backup to uploads/ for safe review.
- File integrity — Detect suspicious code patterns in core files (eval / base64_decode / etc.) by comparing checksums against the WordPress.org Checksum API.
- Suspicious files — Find unexpected PHP files in wp-content/uploads/, with built-in whitelist for known legitimate plugin files (Ajax Load More templates, WP STAGING index.php, AIOS firewall rules, etc.).
- SSL certificate — Check days until expiration (warn under 30 days, critical at 0).
- File permissions — Check critical files like wp-config.php, .htaccess, wp-content/.
Operational features:
- History — Keep the last 10 diagnoses as a custom post type.
- Scheduled auto-check — Run daily, weekly, or monthly via WP Cron.
- Email notifications (automatic diagnosis) — Send alerts only on critical issues.
- PHP security release alerts — Once a day, email when a security release of the server’s PHP branch is not applied yet, or when official security fixes for the branch have ended (each once, plus one reminder if nothing changes after 7 days), and when php.net could not be checked for 7 days. On by default; can be turned off in Settings.
- One-click debug.log backup — Save a copy of debug.log without modifying the original.
- Optional AI report — Generate maintenance suggestions via Anthropic Claude API. Disabled by default; opt-in via a wp-config.php constant.
The plugin is locked to the user who activated it and to the original site URL, so it stays inert after backup restores to a different domain.
External services
This plugin contacts four external services (two of them on php.net).
- WordPress.org Checksums API (
https://api.wordpress.org/core/checksums/1.0/) — every diagnosis (manual or scheduled). The File Integrity check downloads the official checksums for the installed WordPress version to compare them with the core files on your site. Sent: the WordPress version and the site locale as URL parameters (if no checksums exist for the locale, the request is repeated withen_US). No file contents or diagnosis results are sent. As with all requests WordPress makes, the standard user agent includes the WordPress version and the site URL. WordPress.org privacy policy: https://wordpress.org/about/privacy/ - php.net release information (
https://www.php.net/releases/?json) — every diagnosis and once a day (PHP security release alerts; results are cached for up to 6 hours). The PHP check downloads the list of releases of the server’s PHP branch to see whether a newer security release is out. Sent: the PHP branch (for example8.3) as a URL parameter. As with all requests WordPress makes, the standard user agent includes the WordPress version and the site URL. php.net privacy policy: https://www.php.net/privacy.php - php.net PHP branch support dates (
https://www.php.net/releases/states.php) — at the same times as item 2. Downloads the date each PHP branch stops receiving official security fixes. Sent: nothing besides the request itself (no parameters). As with all requests WordPress makes, the standard user agent includes the WordPress version and the site URL. php.net privacy policy: https://www.php.net/privacy.php - Anthropic Claude API (
https://api.anthropic.com/v1/messages) — optional, to generate AI-powered maintenance reports. Details below.
The update checks for WordPress core and plugins use WordPress core’s own functions (wp_version_check() / wp_update_plugins()), which contact WordPress.org in the same way WordPress does on its own. The Site Health check runs WordPress core’s own Site Health tests; one of them is WordPress core’s PHP version check, which sends the PHP version to https://api.wordpress.org/core/serve-happy/1.0/ (WordPress caches the answer for a week). This plugin does not use that answer for its PHP security check, which uses php.net only.
The rest of this section describes the Anthropic Claude API.
When is data sent?
- When you manually click the “Generate AI Report” button in the admin.
- When an automatic scheduled diagnosis detects a critical issue and notifications are enabled. In that case the AI report is generated once per critical run and attached to the notification email.
What data is sent?
- The diagnosis result text only:
- Site URL, site name, WordPress version, theme name
- Names and versions of plugins with available updates, Site Health issue titles (including notices from other plugins)
- PHP version, web server name, memory limit, max upload size, whether a newer PHP security release exists, the date official security fixes for the PHP branch end, and the PHP branches that still receive them
- The size of debug.log and up to 10 error lines from it, as written in the log. Error lines can contain file paths and any data that code wrote into the log, so review debug.log before generating a report if that is a concern
- File Integrity counts, the paths of core files that differ or could not be checked, and suspicious code patterns found in those core files (function names like
eval,base64_decode) - Paths of suspicious PHP files found in the uploads folder, and paths there that could not be read
- Counts (plugins, Site Health results), the latest WordPress version, and the notes each check writes
- SSL expiration date and days remaining
- File-permission status of critical files
- Values that come from the site (error lines, file paths, plugin names, Site Health titles) are shortened to one line of up to 300 characters, and the diagnosis is sent inside a delimited data block that the AI is told never to treat as instructions.
- Apart from what may appear in the error lines above, the plugin does not collect login data, passwords or post content.
Is the data sent unconditionally?
No. The AI feature is completely disabled unless you define NPCMI_API_KEY in wp-config.php. Without that constant, no external connection to Anthropic is ever made.
Anthropic’s terms and privacy policy:
- Consumer Terms of Service: https://www.anthropic.com/legal/consumer-terms
- Privacy Policy: https://www.anthropic.com/legal/privacy
- Commercial Terms of Service (if you use a paid API plan): https://www.anthropic.com/legal/commercial-terms
By enabling the AI report feature (i.e. by defining NPCMI_API_KEY), you agree to Anthropic’s applicable terms.
Installation
- Upload the plugin folder to
/wp-content/plugins/or install it via Plugins → Add New in the admin. - Activate NPC Maintenance Inspector through the Plugins menu.
- Open NPC Inspector in the admin sidebar.
- Click Run Diagnosis to start a manual check.
- (Optional) Open NPC Inspector → Settings to enable scheduled auto-checks and email notifications.
- (Optional) Define
NPCMI_API_KEYinwp-config.phpto enable the AI report feature (see FAQ).
FAQ
Is the AI report feature required?
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.
Does the plugin send any data externally?
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 PHP check downloads from php.net the release list of the server’s PHP branch (the branch, for example 8.3, is the only URL parameter) and the support dates of all PHP branches (no parameters); as with every request WordPress makes, the user agent includes your site URL. The update checks use WordPress core’s own update check. See the External services section below for details.
Who can use the plugin after activation?
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.
Why are AI reports in Japanese?
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.
My site shows “suspicious files” in wp-content/uploads/. Should I delete them?
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.
Screenshots








Changelog
1.0.6 (2026-11-14)
- PHP security release alerts. Until 1.0.5 the PHP item was OK for any PHP 8.0 or later and was never part of the email notifications, so a server missing a PHP security release looked fine. The PHP item now compares the server’s PHP with all releases of the same branch on php.net, and reads the date the branch stops receiving official security fixes from php.net. A security release that is not applied yet is a warning, a branch whose official security fixes have ended is critical (for example PHP 8.1, which ended on 2025-12-31), a branch that ends within 90 days is a warning, and a check that could not reach php.net is a warning instead of OK.
- A daily check (WP Cron, separate from the automatic diagnosis) emails the notification address when a security release of the server’s PHP branch is not applied yet and when official security fixes for the branch have ended (each once, plus one reminder if nothing changes after 7 days), and once when php.net could not be checked for 7 days in a row. When the server runs WP Cron from the command line, the check uses the PHP version last seen on a web request. It is on by default and can be turned off in Settings → PHP security release alerts. The schedule is set on the next page load after the update, so sites updated automatically are covered too.
- debug.log backups: the copy could be read without logging in on servers that ignore .htaccess (such as nginx). The copy was saved under uploads with a name made only of the date and time, and its only protection was a
Deny from all.htaccess. The file name now includes 32 random hexadecimal characters (copies made by earlier versions are renamed the same way on the first page load after the update, keeping their contents), the folder gets anindex.phpand an .htaccess written for both Apache 2.4 and 2.2, only the 5 newest copies are kept, and the download link now goes through an admin screen handler that checks the user, the permission and a nonce. (On Apache, the old link was blocked by the .htaccess itself.) - AI report: text written into debug.log could be read by the AI as instructions. Values that come from the site (error lines, file paths, plugin names, Site Health titles) are now shortened to one line of up to 300 characters without control characters (including Unicode line separators and invisible formatting characters) or
<>, and the diagnosis is sent inside a<diagnosis_data>block that the AI is told never to follow instructions from.
1.0.5 (2026-10-24)
- Suspicious Files: a PHP file hidden in a known plugin folder could pass as harmless. Files in folders such as
uploads/updraft/are treated as plugin files only when they contain nothing but comments, or start with a recognised stop statement such asexit;. 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. - Suspicious Files: a file that starts with an
if ( ! defined( 'ABSPATH' ) )guard was accepted when the guard only began with “exit” or “die”, such as a call to a function namedexitnow()orexit( print( ... ) ). The guard must now be a plainexit;/die;, optionally with a literal message: a single-quoted string, or a double-quoted string without$(a double-quoted string can run code inside{$...}). - When the SSL certificate could not be checked (connection failed or the certificate could not be read), the result is now a warning in the overall grade and on the card instead of being counted as OK.
- The overall grade, the AI report input and the history list now use the same per-item status. Previously the AI report received raw values such as
update_availableandunknown, 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. - The AI report no longer states that notices from other plugins have no effect on the site, and no longer lists them under “no issues”. They are shown in a separate reference section, because the diagnosis does not check their effect. The AI input now starts with a summary of each item’s status, and the AI is asked to list only items whose status is OK under “no issues” (it used to move the parts of a warning item that were fine there), and not to describe checksum differences as false positives or probably safe.
- Admin screen texts are now translated. The JavaScript translation file (
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. - A saved result without the SSL item no longer stops the results screen from rendering, and a saved result with missing items no longer stops the history list from rendering.
- An AI report that was cut off at the length limit is no longer saved as complete. When you generate it manually, you are asked to generate it again; a scheduled run sends the notification without the AI report, as with other AI errors. The length limit was raised from 2000 to 4000 tokens, the request timeout from 60 to 80 seconds, and the AI is asked to keep the report within about 2,500 Japanese characters (in a test with many warnings, the report used to stop in the middle even at 4000 tokens).
- The readme now describes the WordPress.org checksum request made by the File Integrity check. It previously said the AI report was the only external connection.
1.0.4 (2026-10-13)
- File Integrity no longer reports “OK” when nothing was actually checked.
checked_filesused 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_filesis 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. - If any target file is missing or unreadable, or no file could be checked at all, File Integrity is now a warning instead of OK.
- When the checksum data cannot be retrieved from WordPress.org, File Integrity is now counted as a warning in the overall grade and in the AI report input instead of as OK, and the card shows the reason instead of “No changes to core files.”
- An unreadable core file is no longer reported as “modified, no suspicious code”. It is listed as a file that could not be checked.
- A modified file whose contents could not be scanned for suspicious code (unreadable or larger than 1 MB) is no longer described as having no suspicious code. It is counted in
unscanned_count, and the result is not downgraded to OK. - The File Integrity card now says “No changes in the checked core files.” and shows how many files were checked and how many were outside the check scope, missing, unreadable or not scanned. The same counts are passed to the AI report.
- Suspicious Files: unreadable PHP files and folders in the uploads directory are now reported separately (
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 asscanned_count. - The admin script is now loaded with the plugin version (1.0.4). Version 1.0.3 still loaded it as 1.0.2, so browsers could keep using a cached older script.
1.0.3 (2026-08-31)
- Site Health no longer shows a permanent warning for issues that are not meant to be fixed on a live site. WordPress core reports “good” when there are no critical issues, but this plugin flagged a warning whenever any recommended item existed. On maintained sites the same recommended items (outdated MySQL on shared hosting, no persistent object cache) are always present, so the warning was permanently on and stopped carrying information.
- Those items are now excluded from the warning and shown separately as “excluded as no action required”, with the reason kept. Nothing is silently dropped.
- If an excluded test key never matches (e.g. WordPress renames a test), the unmatched keys are reported so the exclusion cannot fail silently.
- The keys of the remaining recommended items are now included in the result, making it possible to review what should be added to the exclusion list.
1.0.2 (2026-08-09)
- Fixed a major bug: WordPress core Site Health tests were never executed. Core registers its tests as strings (e.g.
'test' => 'wordpress_version') which the caller resolves to aget_test_{$key}()method, so checking onlyis_callable()silently skipped all 22 core direct tests. Only tests added by other plugins were being counted. - Site Health results are now split into WordPress core tests (used for the diagnosis) and tests added by other plugins (shown for reference only). Plugins that report their own features as unconfigured no longer affect the overall grade.
- Site Health test results now pass through the
wp_site_health_test_resultfilter, matching core behaviour. - A Site Health test added by another plugin that throws an exception no longer aborts the whole diagnosis; it is recorded as skipped instead.
- AI report prompt updated so plugin-originated notices are listed as “no action required” instead of appearing as critical items.
1.0.1 (2026-05-15)
- Update Claude model to
claude-sonnet-4-6(the previousclaude-sonnet-4-20250514will be retired by Anthropic on 2026-06-15).
1.0.0 (2026-05-11)
- Initial public release on WordPress.org (forked from the internal
npc-wp-healthcheck0.7.8 series). - 9-point health diagnostics.
- Diagnosis history (last 10 entries) stored as a custom post type.
- WP Cron-based auto-check (daily / weekly / monthly).
- Email notifications on critical issues only.
- Optional AI-powered maintenance reports via Anthropic Claude API (opt-in via
NPCMI_API_KEY). - Full internationalization (English source strings, Japanese translation included).
