84% display-current-wp-version

Code Review | Display Current WP Version

WordPress plugin Display Current WP Version scored84%from 54 tests.

About plugin

  • Plugin page: display-current-w...
  • Plugin version: 1.0.2
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-5.9
  • WordPress version: 6.3.1
  • First release: Jan 15, 2022
  • Latest release: Jan 15, 2022
  • Number of updates: 4
  • Update frequency: N/A
  • Top authors: Chaton666 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,143 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed gracefully, with no errors

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

A check of server-side resources used by Display Current WP Version
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0141.64 ▼1.77
Dashboard /wp-admin3.31 ▼0.0348.48 ▼17.01
Posts /wp-admin/edit.php3.36 ▲0.0153.02 ▲1.74
Add New Post /wp-admin/post-new.php5.89 ▲0.0187.18 ▼30.60
Media Library /wp-admin/upload.php3.24 ▲0.0138.75 ▲3.30

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

A short overview of filesystem and database impact
This plugin was installed successfully
Filesystem: 12 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
widget_recent-comments
can_compress_scripts
db_upgraded
widget_theysaidso_widget
theysaidso_admin_options

Browser metrics Passed 4 tests

Checking browser requirements for Display Current WP Version
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲314.21 ▼0.031.65 ▼0.3139.40 ▼3.30
Dashboard /wp-admin2,195 ▲145.66 ▲0.0695.82 ▼12.5244.11 ▲4.04
Posts /wp-admin/edit.php2,100 ▼02.01 ▼0.1239.43 ▲0.2835.98 ▼1.32
Add New Post /wp-admin/post-new.php6,194 ▲4,66819.07 ▼4.56913.71 ▲236.2557.31 ▼5.72
Media Library /wp-admin/upload.php1,400 ▼04.20 ▼0.01114.39 ▲13.3148.81 ▲3.37

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
It is recommended to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-comments
    • widget_recent-posts
    • db_upgraded
    • can_compress_scripts
    • widget_theysaidso_widget
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though no errors were found, 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 take a closer look at the following
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/display-current-wp-version/inc/blocks.php:16

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser issues were found

Optimizations

Plugin configuration Passed 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
4 plugin tags: wordpress, show, version, wp

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

This is the main PHP file of "Display Current WP Version" version 1.0.2, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
58 characters long description:
Show current WordPress version with shortcode [wp-version]

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
Everything looks great! No dangerous files found in this plugin207 lines of code in 9 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript33192124
PHP372445
JSON20036
Markdown1102

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.43
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%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.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
There were not PNG files found in your plugin