90% php-version-plus

Code Review | PHP Version Plus

WordPress plugin PHP Version Plus scored90%from 54 tests.

About plugin

  • Plugin page: php-version-plus
  • Plugin version: 1.0.0
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7.0-5.7
  • WordPress version: 6.3.1
  • First release: Aug 16, 2019
  • Latest release: Jun 3, 2021
  • Number of updates: 3
  • Update frequency: every 219.3 days
  • Top authors: everardonggon (100%)

Code review

54 tests

User reviews

1 review

Install metrics

70+ active /1,169 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
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.02MB] [CPU: ▼3.41ms] Passed 4 tests

Server-side resources used by PHP Version Plus
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0241.20 ▼4.72
Dashboard /wp-admin3.33 ▲0.0251.83 ▼1.78
Posts /wp-admin/edit.php3.37 ▲0.0253.53 ▼3.24
Add New Post /wp-admin/post-new.php5.90 ▲0.02100.96 ▲2.38
Media Library /wp-admin/upload.php3.25 ▲0.0238.83 ▼3.89

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

Analyzing filesystem and database footprints of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 5 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_recent-posts
widget_theysaidso_widget
widget_recent-comments
can_compress_scripts
db_upgraded

Browser metrics Passed 4 tests

This is an overview of browser requirements for PHP Version Plus
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,906 ▲12014.09 ▼0.271.81 ▼0.0345.32 ▲2.17
Dashboard /wp-admin2,315 ▲1445.70 ▲0.0396.02 ▲3.0738.83 ▼7.75
Posts /wp-admin/edit.php2,103 ▲31.98 ▲0.0140.31 ▲0.8236.93 ▼1.95
Add New Post /wp-admin/post-new.php1,526 ▼023.10 ▲0.19645.16 ▼53.3853.40 ▼4.49
Media Library /wp-admin/upload.php1,400 ▼04.22 ▼0.0693.74 ▼19.8740.69 ▼7.44

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
Please fix the following items
  • Zombie WordPress options detected upon uninstall: 6 options
    • db_upgraded
    • widget_recent-comments
    • widget_recent-posts
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_theysaidso_widget

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Everything seems fine, however this is by no means an exhaustive test

SRP Passed 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
Looking good! No server-side errors or output on direct access of PHP files

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
10 plugin tags: version, info, server, widget, php...

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

The main file in "PHP Version Plus" v. 1.0.0 serves as a complement to information provided in readme.txt and as the entry point to the plugin
95 characters long description:
Display PHP version and other essential PHP.ini configuration settings on your admin dashboard.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Good job! No executable or dangerous file extensions detected93 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP193840
JavaScript12035
CSS10018

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.23
Average class complexity2.00
▷ Minimum class complexity2.00
▷ Maximum class complexity2.00
Average method complexity1.20
▷ Minimum method complexity1.00
▷ Maximum method complexity2.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods5
▷ Static methods00.00%
▷ Public methods5100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
There were not PNG files found in your plugin