63% woo-product-slider

Code Review | Product Slider for WooCommerce

WordPress plugin Product Slider for WooCommerce scored63%from 54 tests.

About plugin

  • Plugin page: woo-product-slider
  • Plugin version: 2.6.9
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.3.2
  • WordPress version: 6.3.1
  • First release: Apr 6, 2016
  • Latest release: Oct 31, 2023
  • Number of updates: 168
  • Update frequency: every 16.5 days
  • Top authors: rubel_miah (55.36%)shapedplugin (41.07%)Shamimmiashuhagh (4.76%)

Code review

54 tests

User reviews

240 reviews

Install metrics

20,000+ active /649,640 total downloads

Benchmarks

Plugin footprint 48% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Installer ran successfully

Server metrics [RAM: ▲1.64MB] [CPU: ▲7.52ms] Passed 4 tests

An overview of server-side resources used by Product Slider for WooCommerce
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /5.12 ▲1.6552.46 ▲8.13
Dashboard /wp-admin4.95 ▲1.6458.97 ▲7.10
Posts /wp-admin/edit.php5.00 ▲1.6466.57 ▲18.96
Add New Post /wp-admin/post-new.php7.56 ▲1.6794.85 ▼4.12
Media Library /wp-admin/upload.php4.87 ▲1.6455.55 ▲19.44
Help /wp-admin/edit.php?post_type=sp_wps_shortcodes&page=wps_help4.8850.06
All Sliders /wp-admin/edit.php?post_type=sp_wps_shortcodes4.9570.27
Tools /wp-admin/edit.php?post_type=sp_wps_shortcodes&page=wps_tools4.8952.47
Add New /wp-admin/post-new.php?post_type=sp_wps_shortcodes5.0277.64
Settings /wp-admin/edit.php?post_type=sp_wps_shortcodes&page=wps_settings4.8863.40

Server storage [IO: ▲2.66MB] [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: 165 new files
Database: no new tables, 10 new options
New WordPress options
widget_theysaidso_widget
theysaidso_admin_options
woo_product_slider_db_version
sp_woo_product_slider_review_notice_dismiss
woo_product_slider_version
can_compress_scripts
widget_recent-comments
db_upgraded
sp_woo_product_slider_options
widget_recent-posts

Browser metrics Passed 4 tests

A check of browser resources used by Product Slider for WooCommerce
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,926 ▲16514.26 ▼0.111.93 ▲0.2333.05 ▼10.51
Dashboard /wp-admin2,305 ▲1285.60 ▲0.0094.42 ▼5.6341.92 ▼0.57
Posts /wp-admin/edit.php2,212 ▲1122.03 ▲0.0640.53 ▲4.3538.43 ▲3.93
Add New Post /wp-admin/post-new.php6,253 ▲4,72719.45 ▼4.30943.41 ▲240.9140.27 ▼15.18
Media Library /wp-admin/upload.php1,510 ▲1104.23 ▼0.0999.33 ▼1.3945.17 ▲0.44
Help /wp-admin/edit.php?post_type=sp_wps_shortcodes&page=wps_help2,13011.52306.2690.85
All Sliders /wp-admin/edit.php?post_type=sp_wps_shortcodes1,5244.1359.0978.75
Tools /wp-admin/edit.php?post_type=sp_wps_shortcodes&page=wps_tools1,3624.0658.0586.63
Add New /wp-admin/post-new.php?post_type=sp_wps_shortcodes5,6705.36112.43156.77
Settings /wp-admin/edit.php?post_type=sp_wps_shortcodes&page=wps_settings1,4213.9256.7375.76

Uninstaller [IO: ▲2.66MB] [DB: ▲0.00MB] 25% 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
    • > Compile error in wp-content/plugins/woo-product-slider/main.php+46
    Cannot redeclare is_woo_product_slider_pro() (previously declared in wp-content/plugins/woo-product-slider/main.php:47)
  • This plugin has failed uninstalling correctly, leaving 165 files (2.66MB) in the plugin directory
    • (new file) src/Admin/Dashboard_Notice.php
    • (new file) src/Admin/DBUpdates.php
    • (new file) readme.txt
    • (new file) src/Admin/Elementor_Addons.php
    • (new file) main.php
    • (new file) languages/woo-product-slider.pot
    • (new file) src/Admin/Admin.php
    • (new file) index.php
    • (new file) src/Admin/ElementorAddons/Shortcode_Widget.php
    • (new file) src/Admin/GutenbergBlock/Gutenberg_Init.php
    • ...
  • The uninstall procedure has failed, leaving 11 options in the database
    • woo_product_slider_db_version
    • recovery_mode_email_last_sent
    • widget_recent-posts
    • can_compress_scripts
    • sp_woo_product_slider_options
    • woo_product_slider_version
    • widget_recent-comments
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • sp_woo_product_slider_review_notice_dismiss
    • ...

Smoke tests 75% from 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 50% from 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
The following issues need your attention
  • 38× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Notice
      Undefined variable: post_id in wp-content/plugins/woo-product-slider/src/Frontend/views/partials/dynamic-style.php on line 191
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/woo-product-slider/src/Frontend/views/templates/carousel.php:12
    • > PHP Fatal error
      Uncaught Error: Call to a member function get_price_html() on null in wp-content/plugins/woo-product-slider/src/Frontend/views/templates/loop/price.php:11
    • > PHP Notice
      Undefined variable: shortcode_query in wp-content/plugins/woo-product-slider/src/Frontend/views/templates/pagination.php on line 12
    • > PHP Notice
      Undefined variable: post_id in wp-content/plugins/woo-product-slider/src/Frontend/views/partials/dynamic-style.php on line 213
    • > PHP Notice
      Undefined variable: post_id in wp-content/plugins/woo-product-slider/src/Frontend/views/partials/dynamic-style.php on line 203
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_url() in wp-content/plugins/woo-product-slider/src/Frontend/views/templates/loop/thumbnail.php:12
    • > PHP Notice
      Undefined variable: number_of_total_products in wp-content/plugins/woo-product-slider/src/Frontend/views/templates/pagination.php on line 13
    • > PHP Notice
      Undefined variable: add_to_cart_button in wp-content/plugins/woo-product-slider/src/Frontend/views/templates/loop/add_to_cart.php on line 11
    • > PHP Notice
      Undefined variable: product in wp-content/plugins/woo-product-slider/src/Frontend/views/templates/loop/price.php on line 11

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

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
Attributes that require attention:
  • Tags: You are using too many tags: 35 tag instead of maximum 10
The official readme.txt is a good inspiration

woo-product-slider/main.php 85% from 13 tests

"Product Slider for WooCommerce" version 2.6.9's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
You should first fix the following items:
  • Description: Please keep the plugin description shorter than 140 characters (currently 176 characters long)
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("woo-product-slider.php" instead of "main.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Everything looks great! No dangerous files found in this plugin19,189 lines of code in 139 files:
LanguageFilesBlank linesComment linesLines of code
PHP781,5522,9277,648
CSS159584545,536
JavaScript117402863,179
SVG34022,821
JSON1005

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.54
Average class complexity24.02
▷ Minimum class complexity1.00
▷ Maximum class complexity142.00
Average method complexity5.68
▷ Minimum method complexity1.00
▷ Maximum method complexity51.00
Code structure
Namespaces9
Interfaces0
Traits0
Classes45
▷ Abstract classes24.44%
▷ Concrete classes4395.56%
▷ Final classes00.00%
Methods223
▷ Static methods4821.52%
▷ Public methods21897.76%
▷ Protected methods20.90%
▷ Private methods31.35%
Functions26
▷ Named functions2388.46%
▷ Anonymous functions311.54%
Constants5
▷ Global constants5100.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
5 compressed PNG files occupy 0.20MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
src/Admin/views/models/assets/images/checkerboard.png2.02KB2.54KB0.00%
src/Admin/views/models/assets/images/theme/theme_two.png52.60KB53.37KB0.00%
src/Admin/views/models/assets/images/theme/theme_three.png49.28KB49.35KB0.00%
src/Admin/views/models/assets/images/theme/theme_one.png93.86KB95.45KB0.00%
src/Admin/views/models/assets/images/logo.png2.71KB1.81KB▼ 33.15%