84% display-php-version

Code Review | Display PHP Version

WordPress plugin Display PHP Version scored84%from 54 tests.

About plugin

  • Plugin page: display-php-version
  • Plugin version: 1.8
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-6.2
  • WordPress version: 6.3.1
  • First release: Jul 26, 2011
  • Latest release: May 16, 2023
  • Number of updates: 30
  • Update frequency: every 143.7 days
  • Top authors: dgwyer (100%)

Code review

54 tests

User reviews

35 reviews

Install metrics

60,000+ active /453,466 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Install script ran successfully

Server metrics [RAM: ▲0.01MB] [CPU: ▼4.62ms] Passed 4 tests

Analyzing server-side resources used by Display PHP Version
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0149.46 ▲7.67
Dashboard /wp-admin3.31 ▲0.0148.80 ▼2.95
Posts /wp-admin/edit.php3.36 ▲0.0144.23 ▼1.42
Add New Post /wp-admin/post-new.php5.89 ▲0.0182.18 ▼10.75
Media Library /wp-admin/upload.php3.24 ▲0.0130.92 ▼3.35

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for Display PHP Version
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,842 ▲8114.37 ▼0.182.01 ▲0.2947.13 ▲5.57
Dashboard /wp-admin2,223 ▲525.63 ▲0.0693.62 ▲4.1942.33 ▲1.48
Posts /wp-admin/edit.php2,097 ▼32.03 ▲0.0134.04 ▼0.9233.65 ▼1.08
Add New Post /wp-admin/post-new.php1,526 ▼023.16 ▼0.67682.06 ▲1.1356.13 ▲1.88
Media Library /wp-admin/upload.php1,400 ▼04.24 ▲0.0195.79 ▼10.8840.77 ▼8.07

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • db_upgraded
    • widget_recent-comments
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-posts
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please take a closer look at the following
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/display-php-version/display-php-version.php:48

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
8 plugin tags: widget, admin, php, version, support...

display-php-version/display-php-version.php Passed 13 tests

The primary PHP file in "Display PHP Version" version 1.8 is used by WordPress to initiate all plugin functionality
77 characters long description:
Displays the current PHP version in the "At a Glance" admin dashboard widget.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Everything looks great! No dangerous files found in this plugin32 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP1112723
JavaScript1109

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.09
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions2
▷ Named functions150.00%
▷ Anonymous functions150.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
No PNG files were detected