83% php-version

Code Review | PHP Version

WordPress plugin PHP Version scored 83% from 54 tests.

About plugin

  • Plugin page: php-version
  • Plugin version: 1.0.0
  • PHP compatiblity: 5.6.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-6.3
  • WordPress version: 6.3.1
  • First release: Jun 17, 2019
  • Latest release: Aug 17, 2023
  • Number of updates: 13
  • Update frequency: every 117.2 days
  • Top authors: mazedulislam27 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

1,000+ active / 5,790 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.00MB] [CPU: ▼6.87ms] Passed 4 tests

Analyzing server-side resources used by PHP Version
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0038.90 ▼6.34
Dashboard /wp-admin3.31 ▲0.0144.57 ▼2.31
Posts /wp-admin/edit.php3.36 ▲0.0046.55 ▼4.87
Add New Post /wp-admin/post-new.php5.89 ▲0.0084.29 ▼13.97
Media Library /wp-admin/upload.php3.24 ▲0.0034.89 ▼0.51

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

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 5 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
db_upgraded
widget_recent-comments
widget_theysaidso_widget
widget_recent-posts
theysaidso_admin_options

Browser metrics Passed 4 tests

An overview of browser requirements for PHP Version
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,812 ▲6614.45 ▲0.081.76 ▼0.0342.72 ▲1.98
Dashboard /wp-admin2,218 ▲305.86 ▲0.97106.28 ▲0.0939.10 ▼5.71
Posts /wp-admin/edit.php2,089 ▼02.00 ▼0.0139.68 ▼0.1635.87 ▼3.13
Add New Post /wp-admin/post-new.php1,533 ▼023.42 ▲0.41666.42 ▲8.2456.29 ▲1.54
Media Library /wp-admin/upload.php1,388 ▼04.16 ▼0.0895.15 ▼4.4644.35 ▼5.98

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_theysaidso_widget
    • widget_recent-comments
    • db_upgraded
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
The following issues need your attention
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/php-version/php-version-wordpress.php:22

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
There were no browser issues found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
These attributes need to be fixed:
  • Screenshots: These screenshots do not have images: #3 (icon-128x128.png), #4 (screenshot-1.png), #5 (screenshot-2.png)
  • Tags: Too many tags (11 tag instead of maximum 10); only the first 5 tags are used in your directory listing
The official readme.txt might help

php-version/php-version-wordpress.php 92% from 13 tests

"PHP Version" version 1.0.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
You should first fix the following items:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("php-version.php" instead of "php-version-wordpress.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
No dangerous file extensions were detected15 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP201112
JavaScript1003

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.25
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%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
No PNG images were found in this plugin