67% woo-products-widgets-for-elementor

Code Review | Widgets for WooCommerce Products on Elementor

WordPress plugin Widgets for WooCommerce Products on Elementor scored 67% from 54 tests.

About plugin

  • Plugin page: woo-products-widg...
  • Plugin version: 2.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-6.1.1
  • WordPress version: 6.3.1
  • First release: Jun 13, 2019
  • Latest release: Aug 30, 2023
  • Number of updates: 217
  • Update frequency: every 7.1 days
  • Top authors: themelocation (100%)

Code review

54 tests

User reviews

7 reviews

Install metrics

7,000+ active / 76,031 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Install script ran successfully

Server metrics [RAM: ▲0.63MB] [CPU: ▲2.89ms] Passed 4 tests

Analyzing server-side resources used by Widgets for WooCommerce Products on Elementor
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /4.07 ▲0.6143.41 ▲5.05
Dashboard /wp-admin3.96 ▲0.6547.82 ▼2.31
Posts /wp-admin/edit.php4.01 ▲0.6551.78 ▲7.73
Add New Post /wp-admin/post-new.php6.47 ▲0.5998.35 ▲4.90
Media Library /wp-admin/upload.php3.88 ▲0.6540.55 ▲3.92
Freemius Debug [v.2.5.11] /wp-admin/admin.php?page=freemius4.2035.79
Install Plugins /wp-admin/plugins.php?page=woo-elementor-product-widgets-install-plugins4.0841.46

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 316 new files
Database: no new tables, 9 new options
New WordPress options
fs_active_plugins
fs_accounts
fs_debug_mode
widget_recent-posts
can_compress_scripts
widget_recent-comments
db_upgraded
theysaidso_admin_options
widget_theysaidso_widget

Browser metrics Passed 4 tests

Widgets for WooCommerce Products on Elementor: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,853 ▲11813.18 ▼1.191.58 ▼0.0731.26 ▼17.91
Dashboard /wp-admin2,259 ▲714.88 ▲0.01111.28 ▲6.8047.65 ▲8.51
Posts /wp-admin/edit.php2,153 ▲642.05 ▲0.0543.08 ▲6.8743.06 ▲7.29
Add New Post /wp-admin/post-new.php1,550 ▲3017.64 ▼5.34661.00 ▲10.8256.59 ▼3.40
Media Library /wp-admin/upload.php1,449 ▲614.23 ▲0.0495.12 ▼15.8645.59 ▼1.63
Freemius Debug [v.2.5.11] /wp-admin/admin.php?page=freemius1,0801.7224.9526.69
Install Plugins /wp-admin/plugins.php?page=woo-elementor-product-widgets-install-plugins1,4341.7627.3533.95

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
You still need to fix the following
  • Uninstall procedure validation failed for this plugin
    • > Notice in wp-content/plugins/woo-products-widgets-for-elementor/freemius/includes/class-freemius.php+8515
    Undefined property: stdClass::$plugins
  • Zombie WordPress options detected upon uninstall: 9 options
    • fs_debug_mode
    • db_upgraded
    • theysaidso_admin_options
    • can_compress_scripts
    • fs_active_plugins
    • widget_theysaidso_widget
    • fs_accounts
    • widget_recent-posts
    • widget_recent-comments

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 0% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please fix the following
  • 3× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/woo-products-widgets-for-elementor/templates/woo-products-widgets-categories/global/loop-end.php
    • > /wp-content/plugins/woo-products-widgets-for-elementor/templates/woo-products-widgets-products/global/loop-end.php
    • > /wp-content/plugins/woo-products-widgets-for-elementor/templates/woo-products-widgets-products-list/global/loop-end.php
  • 43× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/woo-products-widgets-for-elementor/templates/woo-products-widgets-products/global/item-thumb.php:6
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/woo-products-widgets-for-elementor/templates/woo-products-widgets-products/global/presets/preset-2.php:7
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/woo-products-widgets-for-elementor/templates/woo-products-widgets-products-list/global/item-thumb.php:6
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/woo-products-widgets-for-elementor/templates/woo-products-widgets-products/global/presets/preset-4.php:6
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/woo-products-widgets-for-elementor/templates/woo-products-widgets-products-list/global/loop-start.php:10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function woo_product_widgets_elementor_template_functions() in wp-content/plugins/woo-products-widgets-for-elementor/templates/woo-products-widgets-products-list/global/item-price.php:6
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/woo-products-widgets-for-elementor/templates/woo-products-widgets-products/global/item-button.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function woo_product_widgets_elementor_template_functions() in wp-content/plugins/woo-products-widgets-for-elementor/templates/woo-products-widgets-products/global/item-rating.php:6
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/woo-products-widgets-for-elementor/templates/woo-products-widgets-products/global/presets/preset-5.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function woo_product_widgets_elementor_template_functions() in wp-content/plugins/woo-products-widgets-for-elementor/templates/woo-products-widgets-products/global/item-tags.php:6

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser issues were found

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
6 plugin tags: theme builder, elementor widget, product grid, elementor, elementor addon...

woo-products-widgets-for-elementor/woo-product-widgets-for-elementor.php 85% from 13 tests

"Widgets for WooCommerce Products on Elementor" version 2.0.0's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
Please make the necessary changes and fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("woo-products-widgets-for-elementor.php" instead of "woo-product-widgets-for-elementor.php")
  • 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 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Good job! No executable or dangerous file extensions detected54,127 lines of code in 260 files:
LanguageFilesBlank linesComment linesLines of code
PHP20310,48321,11145,605
Sass2731333,011
CSS18155103,009
JavaScript103962132,272
Markdown1680214
XML13016

PHP code 50% from 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
These items need your attention
  • Class cyclomatic complexity has to be reduced to less than 1000 (currently 3,087)
Cyclomatic complexity
Average complexity per logical line of code0.57
Average class complexity59.31
▷ Minimum class complexity1.00
▷ Maximum class complexity3,087.00
Average method complexity4.22
▷ Minimum method complexity1.00
▷ Maximum method complexity94.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes90
▷ Abstract classes55.56%
▷ Concrete classes8594.44%
▷ Final classes00.00%
Methods1,657
▷ Static methods21412.91%
▷ Public methods1,19071.82%
▷ Protected methods895.37%
▷ Private methods37822.81%
Functions110
▷ Named functions10999.09%
▷ Anonymous functions10.91%
Constants148
▷ Global constants9866.22%
▷ Class constants5033.78%
▷ Public constants50100.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
7 PNG files occupy 0.56MB with 0.32MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-4.png129.17KB40.70KB▼ 68.49%
assets/images/banner.png27.05KB11.25KB▼ 58.43%
screenshot-1.png49.55KB21.68KB▼ 56.24%
screenshot-2.png66.46KB27.77KB▼ 58.22%
freemius/assets/img/plugin-icon.png9.16KB5.26KB▼ 42.58%