10% woocommerce-category-best-seller-widget

Code Review | Woocommerce Category Best Seller Widget

WordPress plugin Woocommerce Category Best Seller Widget scored10%from 54 tests.

About plugin

  • Plugin page: woocommerce-categ...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-3.5.2
  • WordPress version: 6.3.1
  • First release: Jul 30, 2013
  • Latest release: Jul 30, 2013
  • Number of updates: 4
  • Update frequency: every 1.3 days
  • Top authors: steveostudios (100%)

Code review

54 tests

User reviews

1 review

Install metrics

30+ active /3,591 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
These installer errors require your attention
  • Install procedure validation failed for this plugin
    • > Deprecated in wp-content/plugins/woocommerce-category-best-seller-widget/plugin.php+273
    Function create_function() is deprecated

Server metrics [RAM: ▼1.96MB] [CPU: ▼52.02ms] Passed 4 tests

This is a short check of server-side resources used by Woocommerce Category Best Seller Widget
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /2.03 ▼1.444.93 ▼37.25
Dashboard /wp-admin2.05 ▼1.266.50 ▼42.20
Posts /wp-admin/edit.php2.05 ▼1.315.20 ▼42.04
Add New Post /wp-admin/post-new.php2.05 ▼3.846.95 ▼86.57
Media Library /wp-admin/upload.php2.05 ▼1.184.73 ▼28.65

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for Woocommerce Category Best Seller Widget
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,876 ▲11513.48 ▼1.167.98 ▲6.2244.50 ▼0.57
Dashboard /wp-admin2,202 ▲315.55 ▼0.1284.55 ▼15.5542.05 ▼1.02
Posts /wp-admin/edit.php2,104 ▲42.03 ▲0.0034.02 ▼2.7930.64 ▼4.41
Add New Post /wp-admin/post-new.php1,530 ▲122.93 ▼0.24670.22 ▲65.5653.93 ▼5.39
Media Library /wp-admin/upload.php1,398 ▼24.19 ▼0.0295.24 ▲0.8043.05 ▲1.78

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
These items require your attention
  • Uninstall procedure validation failed for this plugin
    • > Deprecated in wp-content/plugins/woocommerce-category-best-seller-widget/plugin.php+273
    Function create_function() is deprecated
  • Zombie WordPress options were found after uninstall: 7 options
    • widget_woocommerce-category-best-seller
    • widget_recent-comments
    • can_compress_scripts
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 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
Please fix the following
  • 3× PHP files trigger server errors when accessed directly:
    • > PHP Notice
      Undefined variable: best_seller_categories in wp-content/plugins/woocommerce-category-best-seller-widget/views/widget.php on line 2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/woocommerce-category-best-seller-widget/views/admin.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/woocommerce-category-best-seller-widget/plugin.php:32

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
There were no browser issues found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 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
Attributes that require attention:
  • Screenshots: Please add images for these screenshots: #1 (This screen shot description corresponds to screenshot-1.(png|jpg|jpeg|gif). Note that the screenshot is taken from), #2 (This is the second screen shot)
You can look at the official readme.txt

woocommerce-category-best-seller-widget/plugin.php 85% from 13 tests

The main PHP script in "Woocommerce Category Best Seller Widget" version 1.0 is automatically included on every request by WordPress
Please take the time to fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("woocommerce-category-best-seller-widget.php" instead of "plugin.php")
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6

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
Good job! No executable or dangerous file extensions detected301 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code
PHP35689207
CSS20167
PO File10017
JavaScript20210

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.24
Average class complexity12.00
▷ Minimum class complexity12.00
▷ Maximum class complexity12.00
Average method complexity1.92
▷ Minimum method complexity1.00
▷ Maximum method complexity9.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods12
▷ Static methods00.00%
▷ Public methods1191.67%
▷ Protected methods00.00%
▷ Private methods18.33%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
No PNG files were detected