89% woo-smart-compare

Code Review | WPC Smart Compare for WooCommerce

WordPress plugin WPC Smart Compare for WooCommerce scored89%from 54 tests.

About plugin

  • Plugin page: woo-smart-compare
  • Plugin version: 6.1.5
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-6.3
  • WordPress version: 6.3.1
  • First release: May 23, 2017
  • Latest release: Oct 10, 2023
  • Number of updates: 197
  • Update frequency: every 11.8 days
  • Top authors: wpclever (100%)

Code review

54 tests

User reviews

39 reviews

Install metrics

50,000+ active /1,113,777 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully

Server metrics [RAM: ▲0.59MB] [CPU: ▼2.28ms] Passed 4 tests

A check of server-side resources used by WPC Smart Compare for WooCommerce
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /4.05 ▲0.5936.89 ▼0.16
Dashboard /wp-admin3.89 ▲0.5945.31 ▼1.01
Posts /wp-admin/edit.php4.01 ▲0.6547.47 ▲1.00
Add New Post /wp-admin/post-new.php6.49 ▲0.6180.60 ▼8.94
Media Library /wp-admin/upload.php3.82 ▲0.5940.66 ▲7.33
Essential Kit /wp-admin/admin.php?page=wpclever-kit3.7831.99
About /wp-admin/admin.php?page=wpclever3.7834.45

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

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 70 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
db_upgraded
theysaidso_admin_options
widget_theysaidso_widget
can_compress_scripts
widget_recent-comments

Browser metrics Passed 4 tests

A check of browser resources used by WPC Smart Compare for WooCommerce
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,866 ▲10514.28 ▼0.081.66 ▲0.0440.36 ▼4.60
Dashboard /wp-admin2,272 ▲955.72 ▲0.1580.49 ▼8.5089.56 ▲51.45
Posts /wp-admin/edit.php2,178 ▲751.98 ▼0.0335.67 ▼3.1135.41 ▼0.82
Add New Post /wp-admin/post-new.php1,596 ▲6823.17 ▲0.07737.26 ▲114.5054.18 ▲5.26
Media Library /wp-admin/upload.php1,477 ▲774.26 ▲0.0295.81 ▲0.0075.09 ▲33.61
Essential Kit /wp-admin/admin.php?page=wpclever-kit5,7442.1333.2153.49
About /wp-admin/admin.php?page=wpclever1,3992.1430.8137.60

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • db_upgraded
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-posts
    • can_compress_scripts

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP Passed 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Congratulations! This plugin passed the SRP test

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
Attributes that require attention: You can take inspiration from this readme.txt

woo-smart-compare/wpc-smart-compare.php 92% from 13 tests

The principal PHP file in "WPC Smart Compare for WooCommerce" v. 6.1.5 is loaded by WordPress automatically on each request
Please make the necessary changes and fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("woo-smart-compare.php" instead of "wpc-smart-compare.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
No dangerous file extensions were detected13,175 lines of code in 55 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript149344415,384
PHP5392732,925
CSS13520752,856
PO File55926561,500
SVG1702359
Sass1270151

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.34
Average class complexity100.50
▷ Minimum class complexity1.00
▷ Maximum class complexity354.00
Average method complexity6.69
▷ Minimum method complexity1.00
▷ Maximum method complexity64.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods70
▷ Static methods1318.57%
▷ Public methods70100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions3
▷ Named functions266.67%
▷ Anonymous functions133.33%
Constants10
▷ Global constants10100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
1 PNG file occupies 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/images/placeholder.png2.79KB1.61KB▼ 42.29%