| 开发者 | maksymkotenko |
|---|---|
| 更新时间 | 2026年11月12日 19:40 |
| PHP版本: | 7.4 及以上 |
| WordPress版本: | 7.1 |
| 版权: | GPLv2 or later |
| 版权网址: | 版权信息 |
if ( PHP_VERSION_ID < 80000 ), version_compare( PHP_VERSION, '8.0', '<' ), function_exists( 'get_magic_quotes_gpc' ) && get_magic_quotes_gpc() or defined( 'MB_OVERLOAD_STRING' ). When such a check is false on the target version, the code behind it never runs there, so it is not counted. Leaplens follows if, elseif and else branches, &&, || and ? :; the lines it set aside are one click away.
PHP 7.4 to 8.5
Pick the target version: 7.4, 8.0, 8.1, 8.2, 8.3, 8.4 or 8.5. The checks come from the PHPCompatibility rules for PHP_CodeSniffer, development version, which already cover PHP 8.5: the backtick operator, (boolean), (integer), (double) and (binary) casts, case ending with a semicolon, curl_close(), imagedestroy(), mysqli_execute() and the other 8.5 deprecations, along with everything removed in PHP 8.0 and deprecated in 8.1 to 8.4.
Built for shared hosting
exec(), a command line or an external scanning service.return for old PHP, or behind a check in another function, is still counted. Treat the verdicts as a checklist, and test the switch on a staging copy first.
The scan runs only while you or WP-Cron ask for it, a few seconds at a time, and reads files without running them. Visitors are not affected. A typical site with 20 plugins takes a few minutes.
No. All analysis happens on your server and no code leaves it. The plugin talks to WordPress.org only, the same way WordPress's own update checks do: for a plugin or theme with errors it asks the WordPress.org directory whether that project is closed and when it was last updated (the request names the plugin or theme), and, when "Also check available updates" is on, it downloads the update WordPress already found for it. Like every request WordPress makes, these carry WordPress's standard user agent with your site address.
If the site runs PHP 8.3 today and a plugin still calls a function removed in PHP 8.0, that line never runs on your site, or the site would already be broken. Such findings are not counted for the target version and are hidden by default.
The line sits behind a PHP version check or function_exists() that cannot be true on the target version, for example if ( PHP_VERSION_ID < 80000 ) when you check PHP 8.4. It runs only on older PHP, so it does not count against the plugin. Such lines are hidden by default; tick the box under the plugin's lines to show them.
Yes. The scanner runs PHP_CodeSniffer inside the WordPress request and needs only the standard tokenizer extension. The bundled libraries make no calls to exec(), shell_exec() or proc_open(): the few command-line code paths of PHP_CodeSniffer that used them are removed when the libraries are bundled.
Yes. Active ones are selected by default; use "Select all" to include the rest.
Administrators. On multisite, network administrators only, because plugins and themes are shared by the whole network.
function_exists() or defined() that is false on the target PHP is no longer counted as an error or deprecation: fewer false "Fix needed" verdicts for plugins that keep old code for old PHP. Those lines stay one click away.