Linux 软件免费装
Banner图

ThemeGuard 8x – Compatibility Scanner for PHP 8

开发者 bmishico
freemius
更新时间 2026年11月21日 11:56
捐献地址: 去捐款
PHP版本: 7.4 及以上
WordPress版本: 7.1
版权: GPL-2.0-or-later
版权网址: 版权信息

标签

migration scanner upgrade php 8 php compatibility

下载

3.5.3

详情介绍:

Before you switch a site to PHP 8.4, ThemeGuard 8x finds the lines in your theme that will stop it: functions PHP removed, syntax PHP 8 no longer parses, and calls into a plugin that is not active (get_field() with Advanced Custom Fields switched off). Each finding shows the real file and line, why it breaks, and how to fix it. ThemeGuard 8x is a small, dependency-free scanner. It reads your PHP with PHP's own tokenizer and flags code that breaks or is deprecated between PHP 7.4 and 8.4. For each finding it shows the file, the line number, what the problem is, and a worked fix. Findings are tiered: The LEGACY tier exists because of a real field test. Scanning a working PHP 8.4 site reported 55 "fatal" findings; 54 were ext/mysql calls sitting in dead compatibility branches of code that still supports very old PHP. Those functions vanished in PHP 7.0. If any of those lines were reachable the site would have died years earlier, on the 7.0 upgrade. They are worth knowing about and they are not what stops you moving to 8.4, so they get their own band and the FATAL count stays trustworthy. Findings are also split by fix type. EXACT FIX findings are a deterministic one-line change, described in the finding's Fix text. NEEDS REVIEW findings show the surrounding block plus a worked before/after pattern, and never a guessed rewrite - because a wrong line that looks right is worse than no line at all. When a rule cannot be applied cleanly to your specific line, the finding downgrades to NEEDS REVIEW rather than guessing. It scans the active theme, and its parent theme when a child theme is active. Run it from Dev Toolbx -> ThemeGuard 8x and press "Run scan". Download the current result as JSON or as a Markdown report with one click, next to the machine-readable block. Both are generated in your browser. The scan only reads files; it never edits your theme. From WP-CLI, wp tg84 scan --format=csv prints the result as CSV, one row per finding. What it catches (a curated set of the real-world breakers): Every rule is traceable to an entry in the official php/php-src UPGRADING notes.

安装:

  1. Upload the themeguard-8x folder to /wp-content/plugins/ and activate it.
  2. Go to Dev Toolbx -> ThemeGuard 8x.
  3. Press "Run scan" and read the report.

屏幕截图:

  • A Fatal finding with its source lines, the function it sits in and the fix.
  • A theme calling a plugin that is not active, reported as Fatal with the plugin named.

常见问题:

Does it change my theme?

No. The scan only reads files; it never edits your theme. It prints a report, and the downloads are built in your browser.

Does it scan plugins?

The free version scans your active theme and its parent theme. Scanning plugin code is part of ThemeGuard 8x Pro: any one plugin folder, all plugins at once, the wp-content drop-ins, or everything in wp-content. Pro's Plugins panel also gives every installed plugin a verdict (update, update after the switch, check with the vendor, replace, delete) from wordpress.org and WordPress's own update data, without reading the plugin's code.

What does Pro add?

The free version is the whole scanner for your theme: every rule and every tier, with the file, line, cause and fix of each finding, Copy for AI, the JSON and Markdown downloads, the rescan diff, the REST API and WP-CLI. Nothing in it is time-limited or locked behind a key, and Pro runs the same rules, plus those for the PHP versions after 8.4. ThemeGuard 8x Pro adds:

  • scans of your plugins (one, all of them at once, or everything in wp-content) and the drop-ins such as db.php and object-cache.php, where abandoned plugins that will never get a fix show up;
  • the Plugins panel, also over REST and WP-CLI;
  • the rewritten line for each finding with an exact fix, with a copy button;
  • CSV export on the report page, Markdown copy with the rewritten lines, and an AI fix brief for the whole scan;
  • the PHP versions after 8.4 as scan targets;
  • after the PHP switch, an error recorder (every PHP error on the site for 24 hours, each linked to its theme or plugin and to the scan finding on the same line) and a test crawl of your pages (the home page, one page per template, recent posts, every public post type, search, a 404, wp-login.php and the REST API root), kept as a baseline before the switch so every later run says what is new, what was already there and what is fixed.
The one file Pro writes is the loader of its error recorder, wp-content/mu-plugins/tg84-recorder.php, and only while the recorder is switched on: switching it off, deactivating or deleting Pro removes it. On a site whose environment type is production it asks you to confirm first. On its report page the free version suggests Pro once: a panel you can dismiss for good.

Does it send anything off my site?

The free version talks only to Freemius, and only when you act: see External services. Pro also asks wordpress.org about your plugins. There is no tracking. If you opt in to Freemius when the plugin asks, Freemius receives what its opt-in screen lists; if you skip, nothing is sent. The one exception is your choice: the optional "why are you deactivating" question. If you answer it with "Anonymous feedback" ticked, your answer goes to Freemius with an anonymous site id when you delete the plugin. If you answer it with that box unticked (as it starts), deleting the plugin also opts the site in: Freemius then receives your answer and what the opt-in screen lists, which is your WordPress user's name and email address, the site's address and id, the plugin and SDK versions, and, unless the SDK's diagnostic permission is off, the site's name and language and its WordPress and PHP versions. If you do not answer, nothing is sent.

Does Upgrade or Account work on my other WP Engine address?

Yes, when the site's own address is a WP Engine one. ThemeGuard 8x makes its own screens work when wp-admin is open on the install's other WP Engine address (<install>.wpengine.com and <install>.wpenginepowered.com), and on nothing wider. To switch that off, add define( 'TG84_SAME_HOST', false ); to wp-config.php.

How do I upgrade?

Dev Toolbx -> Upgrade shows the ThemeGuard 8x Pro lifetime licenses. Checkout is run by Freemius. After checkout, download ThemeGuard 8x Pro from your Freemius account and install it on the Plugins screen.

Does it remember previous scans?

No, by design. A rescan shows current truth. Fix in your editor, upload, rescan - the rescan is the proof. To see what a patch closed, hand the earlier result back as previous (REST) or --previous=<file> (WP-CLI): each finding is tagged fixed, open or new by its fingerprint.

更新日志:

3.5.3 3.5.2