89% woo-products-by-category

Code Review | List Products By Category Widget for WooCommerce

WordPress plugin List Products By Category Widget for WooCommerce scored89%from 54 tests.

About plugin

  • Plugin page: woo-products-by-c...
  • Plugin version: 1.3.0
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.0-5.5.3
  • WordPress version: 6.3.1
  • First release: Sep 2, 2018
  • Latest release: Nov 8, 2020
  • Number of updates: 34
  • Update frequency: every 23.5 days
  • Top authors: arapps92 (97.06%)blazeconcepts (5.88%)

Code review

54 tests

User reviews

5 reviews

Install metrics

1,000+ active /16,277 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
Installer ran successfully

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

Server-side resources used by List Products By Category Widget for WooCommerce
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0737.01 ▼3.58
Dashboard /wp-admin3.37 ▲0.0743.45 ▼4.13
Posts /wp-admin/edit.php3.42 ▲0.0645.91 ▲0.45
Add New Post /wp-admin/post-new.php5.95 ▲0.0682.06 ▼12.47
Media Library /wp-admin/upload.php3.30 ▲0.0632.33 ▼1.41

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_recent-comments
can_compress_scripts
widget_wcpbc_products_by_category
db_upgraded
widget_theysaidso_widget
theysaidso_admin_options

Browser metrics Passed 4 tests

List Products By Category Widget for WooCommerce: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,827 ▲7014.48 ▲0.111.82 ▼0.1537.83 ▼9.47
Dashboard /wp-admin2,209 ▲184.86 ▼0.00109.24 ▲3.6941.23 ▼3.71
Posts /wp-admin/edit.php2,092 ▲62.02 ▲0.0240.76 ▲4.3734.25 ▼3.59
Add New Post /wp-admin/post-new.php1,533 ▼023.23 ▼0.01594.13 ▼91.0550.36 ▲0.29
Media Library /wp-admin/upload.php1,388 ▲34.19 ▼0.0393.70 ▼6.4040.73 ▼2.60

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
  • The uninstall procedure has failed, leaving 7 options in the database
    • widget_theysaidso_widget
    • widget_recent-comments
    • widget_recent-posts
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_wcpbc_products_by_category
    • db_upgraded

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
The smoke test was a success, however most plugin functionality was not tested

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 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
Attributes that require attention: The official readme.txt might help

woo-products-by-category/wcpbc.php 85% from 13 tests

Analyzing the main PHP file in "List Products By Category Widget for WooCommerce" version 1.3.0
It is important to fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("woo-products-by-category.php" instead of "wcpbc.php")
  • Requires at least: Required version must be the same as 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 | A short check of programming languages and file extensions; no executable files are allowed
There were no executable files found in this plugin400 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP32719399
CSS1001

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.43
Average class complexity70.00
▷ Minimum class complexity70.00
▷ Maximum class complexity70.00
Average method complexity18.25
▷ Minimum method complexity1.00
▷ Maximum method complexity47.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%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
No PNG images were found in this plugin