68% product-version-info

Code Review | Product Version Info

WordPress plugin Product Version Info scored68%from 54 tests.

About plugin

  • Plugin page: product-version-info
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-3.5.1
  • WordPress version: 6.3.1
  • First release: Jul 8, 2013
  • Latest release: Jul 8, 2013
  • Number of updates: 2
  • Update frequency: every 1.5 days
  • Top authors: kmteoh (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /719 total downloads

Benchmarks

Plugin footprint 65% 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 successfully, without throwing any errors or notices

Server metrics [RAM: ▼0.94MB] [CPU: ▼32.28ms] Passed 4 tests

This is a short check of server-side resources used by Product Version Info
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0135.55 ▼14.39
Dashboard /wp-admin3.00 ▼0.3031.44 ▼17.95
Posts /wp-admin/edit.php3.00 ▼0.3523.40 ▼25.07
Add New Post /wp-admin/post-new.php3.00 ▼2.8823.32 ▼71.47
Media Library /wp-admin/upload.php3.00 ▼0.2324.82 ▼14.64
Version Info /wp-admin/options-general.php?page=versioninfo3.0025.65

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

Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 2 new files
Database: no new tables, 7 new options
New WordPress options
can_compress_scripts
theysaidso_admin_options
db_upgraded
versioninfo_value
widget_theysaidso_widget
widget_recent-comments
widget_recent-posts

Browser metrics Passed 4 tests

A check of browser resources used by Product Version Info
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,793 ▲3214.28 ▼0.081.72 ▼0.8339.53 ▼4.23
Dashboard /wp-admin2,199 ▲225.63 ▲0.1183.31 ▼5.2445.04 ▲2.98
Posts /wp-admin/edit.php2,104 ▲12.03 ▲0.0235.47 ▼3.0437.58 ▲0.46
Add New Post /wp-admin/post-new.php1,529 ▲323.51 ▲0.41683.83 ▼15.7766.29 ▲8.12
Media Library /wp-admin/upload.php1,395 ▼84.19 ▼0.01108.38 ▲4.2650.80 ▲3.49
Version Info /wp-admin/options-general.php?page=versioninfo8011.9836.0725.89

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
You still need to fix the following
  • This plugin did not uninstall without warnings or errors
    • > User deprecated in wp-includes/functions.php+5737
    Function has_cap was called with an argument that is deprecated since version 2.0.0! Usage of user levels is deprecated. Use capabilities instead.
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_theysaidso_widget
    • widget_recent-comments
    • widget_recent-posts
    • theysaidso_admin_options
    • db_upgraded
    • can_compress_scripts

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Please fix the following server-side errors
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=versioninfo
    • > User deprecated in wp-includes/functions.php+5737
    Function has_cap was called with an argument that is deprecated since version 2.0.0! Usage of user levels is deprecated. Use capabilities instead.
    • > GET request to /wp-admin/options-general.php?page=versioninfo
    • > Warning in wp-includes/class-wp-hook.php+310
    call_user_func_array() expects parameter 1 to be a valid callback, function 'versioninfo_settings_init' not found or invalid function name
    • > GET request to /wp-admin/options-general.php?page=versioninfo
    • > User deprecated in wp-includes/functions.php+5463
    Function screen_icon is deprecated since version 3.8.0 with no alternative available.
    • > GET request to /wp-admin/options-general.php?page=versioninfo
    • > User deprecated in wp-includes/functions.php+5463
    Function get_screen_icon is deprecated since version 3.8.0 with no alternative available.

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Almost there! Just fix the following items
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/product-version-info/versioninfo.php:29

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
No browser issues were found

Optimizations

Plugin configuration 93% from 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
4 plugin tags: javascript, api, version, json

product-version-info/versioninfo.php 85% from 13 tests

Analyzing the main PHP file in "Product Version Info" version 1.0
Please take the time to fix the following:
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 340 characters long)
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("product-version-info.php" instead of "versioninfo.php")

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 plugin54 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP1122954

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.11
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%
Functions6
▷ Named functions6100.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