83% php-compatibility-checker

Code Review | PHP Compatibility Checker

WordPress plugin PHP Compatibility Checker scored83%from 54 tests.

About plugin

  • Plugin page: php-compatibility...
  • Plugin version: 1.6.2
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.6-6.2
  • WordPress version: 6.3.1
  • First release: Jun 29, 2016
  • Latest release: May 4, 2023
  • Number of updates: 72
  • Update frequency: every 34.7 days
  • Top authors: wpengine (87.5%)octalmage (11.11%)stevenkword (4.17%)

Code review

54 tests

User reviews

128 reviews

Install metrics

200,000+ active /2,490,276 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.10MB] [CPU: ▼10.12ms] Passed 4 tests

Analyzing server-side resources used by PHP Compatibility Checker
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.58 ▲0.1141.58 ▼0.28
Dashboard /wp-admin3.41 ▲0.0646.57 ▼20.26
Posts /wp-admin/edit.php3.53 ▲0.1747.98 ▼0.51
Add New Post /wp-admin/post-new.php5.99 ▲0.1081.72 ▼17.05
Media Library /wp-admin/upload.php3.34 ▲0.1035.31 ▼2.66
PHP Compatibility /wp-admin/tools.php?page=wpe-php-compat3.3535.19

Server storage [IO: ▲0.05MB] [DB: ▲0.00MB] Passed 3 tests

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 7 new files
Database: no new tables, 7 new options
New WordPress options
wpephpcompat_is_wptide
widget_recent-comments
db_upgraded
widget_recent-posts
theysaidso_admin_options
widget_theysaidso_widget
can_compress_scripts

Browser metrics Passed 4 tests

Checking browser requirements for PHP Compatibility Checker
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲5813.30 ▼0.971.79 ▼0.0243.98 ▲1.29
Dashboard /wp-admin2,210 ▲224.83 ▼1.0298.74 ▼23.1036.72 ▼6.12
Posts /wp-admin/edit.php2,093 ▲42.00 ▼0.0134.61 ▼0.6834.47 ▼0.01
Add New Post /wp-admin/post-new.php1,536 ▲2223.48 ▲6.04667.63 ▼12.4351.70 ▼1.40
Media Library /wp-admin/upload.php1,392 ▲44.20 ▲0.0295.87 ▼1.2640.59 ▼4.32
PHP Compatibility /wp-admin/tools.php?page=wpe-php-compat9562.4131.7828.39

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 75% from 4 tests

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
You still need to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • db_upgraded
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-comments
    • widget_recent-posts
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please fix the following items
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function WPEngine_PHPCompat\\add_action() in wp-content/plugins/php-compatibility-checker/wpengine-phpcompat.php:92

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side

Optimizations

Plugin configuration 90% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
10 plugin tags: wpe, php 7, compat, checker, wp engine...

php-compatibility-checker/wpengine-phpcompat.php 77% from 13 tests

The main file in "PHP Compatibility Checker" v. 1.6.2 serves as a complement to information provided in readme.txt and as the entry point to the plugin
Please make the necessary changes and fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("php-compatibility-checker.php" instead of "wpengine-phpcompat.php")
  • Domain Path: The domain path is invalid: folder "/languages" does not exist
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
No dangerous file extensions were detected412 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP3100186410
CSS1001
JavaScript1001

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.19
Average class complexity17.00
▷ Minimum class complexity17.00
▷ Maximum class complexity17.00
Average method complexity2.20
▷ Minimum method complexity1.00
▷ Maximum method complexity6.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods8
▷ Static methods112.50%
▷ Public methods8100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions13
▷ Named functions753.85%
▷ Anonymous functions646.15%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
There were not PNG files found in your plugin