84% wcboost-products-compare

Code Review | WCBoost - Products Compare

WordPress plugin WCBoost - Products Compare scored84%from 54 tests.

About plugin

  • Plugin page: wcboost-products-...
  • Plugin version: 1.0.2
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.5-6.3
  • WordPress version: 6.3.1
  • First release: Nov 25, 2022
  • Latest release: Aug 9, 2023
  • Number of updates: 8
  • Update frequency: every 32.2 days
  • Top authors: wcboost (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10,000+ active /36,312 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.03MB] [CPU: ▼11.64ms] Passed 4 tests

This is a short check of server-side resources used by WCBoost - Products Compare
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0440.07 ▼2.61
Dashboard /wp-admin3.34 ▼0.0042.65 ▼21.50
Posts /wp-admin/edit.php3.46 ▲0.1044.09 ▼4.83
Add New Post /wp-admin/post-new.php5.92 ▲0.0480.58 ▼17.60
Media Library /wp-admin/upload.php3.27 ▲0.0433.79 ▼1.91

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for WCBoost - Products Compare
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲4313.54 ▼1.111.74 ▼0.2840.91 ▼4.70
Dashboard /wp-admin2,203 ▲155.83 ▼0.0297.90 ▼5.1040.30 ▼6.63
Posts /wp-admin/edit.php2,089 ▼02.11 ▲0.0939.17 ▼2.5034.63 ▲0.90
Add New Post /wp-admin/post-new.php1,514 ▼1917.44 ▼5.54674.89 ▲18.8856.59 ▼2.47
Media Library /wp-admin/upload.php1,391 ▲34.22 ▲0.0195.76 ▼10.5041.02 ▼1.34

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
The following items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-comments
    • widget_recent-posts
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
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 fix the following
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function WCBoost\\ProductsCompare\\Admin\\add_filter() in wp-content/plugins/wcboost-products-compare/includes/admin/settings.php:13

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)
There were no browser issues found

Optimizations

Plugin configuration 96% from 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
5 plugin tags: woocommerce compare, product compare, woocommerce, product, compare

wcboost-products-compare/wcboost-products-compare.php 92% from 13 tests

Analyzing the main PHP file in "WCBoost - Products Compare" version 1.0.2
It is important to fix the following:
  • Description: Please keep the plugin description shorter than 140 characters (currently 273 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Good job! No executable or dangerous file extensions detected2,189 lines of code in 26 files:
LanguageFilesBlank linesComment linesLines of code
PHP193526451,380
JavaScript414554493
Sass1612308
XML1007
CSS1001

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.41
Average class complexity14.75
▷ Minimum class complexity3.00
▷ Maximum class complexity58.00
Average method complexity2.85
▷ Minimum method complexity1.00
▷ Maximum method complexity21.00
Code structure
Namespaces3
Interfaces0
Traits0
Classes12
▷ Abstract classes00.00%
▷ Concrete classes12100.00%
▷ Final classes18.33%
Methods89
▷ Static methods3235.96%
▷ Public methods7887.64%
▷ Protected methods55.62%
▷ Private methods66.74%
Functions4
▷ Named functions250.00%
▷ Anonymous functions250.00%
Constants2
▷ Global constants00.00%
▷ Class constants2100.00%
▷ Public constants2100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

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