83% php-version-display

Code Review | PHP Version Display

WordPress plugin PHP Version Display scored83%from 54 tests.

About plugin

  • Plugin page: php-version-display
  • Plugin version: 1.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.0.1
  • WordPress version: 6.3.1
  • First release: Aug 27, 2022
  • Latest release: Aug 28, 2022
  • Number of updates: 9
  • Update frequency: every 0.7 days
  • Top authors: amrnaga (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /230 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed successfully, without throwing any errors or notices

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

Analyzing server-side resources used by PHP Version Display
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0137.67 ▼1.62
Dashboard /wp-admin3.32 ▲0.0146.82 ▼6.88
Posts /wp-admin/edit.php3.37 ▲0.0143.54 ▼1.10
Add New Post /wp-admin/post-new.php5.90 ▲0.0190.74 ▼2.02
Media Library /wp-admin/upload.php3.24 ▲0.0133.46 ▼2.62

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

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

Browser metrics Passed 4 tests

Checking browser requirements for PHP Version Display
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,810 ▲6413.64 ▼0.751.90 ▲0.1434.38 ▼13.39
Dashboard /wp-admin2,219 ▲315.85 ▲0.97100.67 ▼21.4239.15 ▼4.27
Posts /wp-admin/edit.php2,068 ▼212.02 ▲0.0133.00 ▼1.2130.42 ▼3.74
Add New Post /wp-admin/post-new.php1,533 ▼023.23 ▲0.03647.53 ▼29.0149.49 ▼6.69
Media Library /wp-admin/upload.php1,388 ▼04.28 ▲0.0499.03 ▲0.8743.90 ▼1.51

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • This plugin does not fully uninstall, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_recent-comments
    • db_upgraded
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-posts

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 | 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× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/php-version-display/PHP-Version-Display.php

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
Attributes that need to be fixed: You can look at the official readme.txt

php-version-display/PHP-Version-Display.php 85% from 13 tests

Analyzing the main PHP file in "PHP Version Display" version 1.0.1
It is important to fix the following:
  • Text Domain: The text domain name must use dashes instead of underscores, and it must be lowercase
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("php-version-display.php" instead of "PHP-Version-Display.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Everything looks great! No dangerous files found in this plugin27 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP273127

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.08
Average class complexity1.00
▷ Minimum class complexity1.00
▷ Maximum class complexity1.00
Average method complexity1.00
▷ Minimum method complexity1.00
▷ Maximum method complexity1.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods3
▷ Static methods00.00%
▷ Public methods3100.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

Using a strong compression for your PNG files is a great way to speed-up your plugin
There are no PNG files in this plugin