89% woo-best-selling-products

Code Review | Best Selling Products for WooCommerce

WordPress plugin Best Selling Products for WooCommerce scored89%from 54 tests.

About plugin

  • Plugin page: woo-best-selling-...
  • Plugin version: 1.3.1
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.0-5.5.3
  • WordPress version: 6.3.1
  • First release: Apr 13, 2019
  • Latest release: Nov 8, 2020
  • Number of updates: 14
  • Update frequency: every 41.3 days
  • Top authors: arapps92 (78.57%)blazeconcepts (28.57%)

Code review

54 tests

User reviews

3 reviews

Install metrics

900+ active /8,180 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.06MB] [CPU: ▼7.11ms] Passed 4 tests

Analyzing server-side resources used by Best Selling Products for WooCommerce
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0636.32 ▲2.82
Dashboard /wp-admin3.36 ▲0.0641.82 ▼8.57
Posts /wp-admin/edit.php3.41 ▲0.0645.26 ▲4.20
Add New Post /wp-admin/post-new.php5.94 ▲0.0674.34 ▼25.12
Media Library /wp-admin/upload.php3.29 ▲0.0636.38 ▲2.44

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

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

Browser metrics Passed 4 tests

Best Selling Products for WooCommerce: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,802 ▲5613.29 ▼1.104.24 ▲2.5837.79 ▼5.46
Dashboard /wp-admin2,206 ▲184.85 ▼0.01113.15 ▼1.6944.32 ▼1.36
Posts /wp-admin/edit.php2,089 ▼01.97 ▼0.0336.15 ▼7.5330.81 ▼3.70
Add New Post /wp-admin/post-new.php1,533 ▼023.10 ▼0.12652.56 ▲36.4456.95 ▲4.38
Media Library /wp-admin/upload.php1,382 ▼64.22 ▼0.0198.61 ▲1.4741.48 ▼1.31

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 7 options in the database
    • widget_recent-posts
    • widget_theysaidso_widget
    • db_upgraded
    • widget_woobsp_best_selling_products
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-comments

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Good news, no errors were detected

SRP Passed 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
The SRP test was a success

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
9 plugin tags: sidebar, filter, categories, widget, woocommerce...

woo-best-selling-products/woobsp.php 85% from 13 tests

The principal PHP file in "Best Selling Products for WooCommerce" v. 1.3.1 is loaded by WordPress automatically on each request
Please make the necessary changes and fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("woo-best-selling-products.php" instead of "woobsp.php")
  • Requires at least: The required version number must match the one declared in readme.txt ("4.9" instead of "3.0.0")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Everything looks great! No dangerous files found in this plugin466 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP43520416
CSS19050

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.33
Average class complexity45.00
▷ Minimum class complexity45.00
▷ Maximum class complexity45.00
Average method complexity12.00
▷ Minimum method complexity1.00
▷ Maximum method complexity36.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods4
▷ Static methods00.00%
▷ Public methods4100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions5
▷ Named functions5100.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