89% gm-woo-product-list-widget

Code Review | Product Shortcode - Widget - Block for Woocommerce

WordPress plugin Product Shortcode - Widget - Block for Woocommerce scored89%from 54 tests.

About plugin

  • Plugin page: gm-woo-product-li...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Apr 29, 2019
  • Latest release: Sep 3, 2023
  • Number of updates: 36
  • Update frequency: every 44.1 days
  • Top authors: gravitymaster97 (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

600+ active /4,204 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.11MB] [CPU: ▼8.10ms] Passed 4 tests

Server-side resources used by Product Shortcode - Widget - Block for Woocommerce
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.57 ▲0.1040.17 ▼2.90
Dashboard /wp-admin3.40 ▲0.1049.82 ▼6.37
Posts /wp-admin/edit.php3.52 ▲0.1648.65 ▲2.04
Add New Post /wp-admin/post-new.php6.01 ▲0.1283.34 ▼22.16
Media Library /wp-admin/upload.php3.33 ▲0.1035.68 ▼0.97
Product Widget /wp-admin/edit.php?post_type=product_widget3.3735.96
Add New /wp-admin/post-new.php?post_type=product_widget3.3642.65

Server storage [IO: ▲0.02MB] [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: 9 new files
Database: no new tables, 7 new options
New WordPress options
db_upgraded
widget_theysaidso_widget
widget_gmwplw_products_list_widget_filter
theysaidso_admin_options
widget_recent-comments
can_compress_scripts
widget_recent-posts

Browser metrics Passed 4 tests

Product Shortcode - Widget - Block for Woocommerce: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,839 ▲9313.23 ▼1.021.81 ▲0.1144.56 ▼1.10
Dashboard /wp-admin2,237 ▲495.85 ▲0.7996.94 ▼10.2240.11 ▼3.14
Posts /wp-admin/edit.php2,123 ▲342.05 ▲0.0435.92 ▼3.2634.41 ▼1.64
Add New Post /wp-admin/post-new.php1,567 ▲4818.10 ▼5.04643.10 ▼30.3353.45 ▲0.89
Media Library /wp-admin/upload.php1,425 ▲404.25 ▼0.1699.06 ▼2.8441.83 ▼1.29
Product Widget /wp-admin/edit.php?post_type=product_widget1,0841.9430.5529.09
Add New /wp-admin/post-new.php?post_type=product_widget1,6512.5751.3751.05

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_gmwplw_products_list_widget_filter
    • db_upgraded
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_recent-posts
    • can_compress_scripts

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though everything seems fine, this is not an exhaustive test

SRP Passed 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
No output text or server-side errors detected on direct access of PHP files

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser errors were detected

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
These attributes need to be fixed:
  • Contributors: The plugin contributors field is missing
  • Screenshots: These screenshots lack descriptions #1, #2, #3, #4, #5 in gm-woo-product-list-widget/assets to your readme.txt
The official readme.txt is a good inspiration

gm-woo-product-list-widget/gm-woo-product-list-widget.php 92% from 13 tests

The main file in "Product Shortcode - Widget - Block for Woocommerce" v. 1.0 serves as a complement to information provided in readme.txt and as the entry point to the plugin
Please make the necessary changes and fix the following:
  • Text Domain: If you choose to specify the text domain, it must be the same as the plugin slug; optional since WordPress version 4.6

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
There were no executable files found in this plugin552 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code
PHP58129487
CSS201146
JavaScript132119

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.39
Average class complexity9.75
▷ Minimum class complexity1.00
▷ Maximum class complexity31.00
Average method complexity3.33
▷ Minimum method complexity1.00
▷ Maximum method complexity27.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods15
▷ Static methods16.67%
▷ Public methods15100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants4100.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
PNG images were not found in this plugin