83% wpb-woocommerce-product-slider

Code Review | WPB Product Slider for WooCommerce - Product Carousel

WordPress plugin WPB Product Slider for WooCommerce - Product Carousel scored83%from 54 tests.

About plugin

  • Plugin page: wpb-woocommerce-p...
  • Plugin version: 2.0.9.7
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.3.1
  • WordPress version: 6.3.1
  • First release: Jun 4, 2014
  • Latest release: Aug 29, 2023
  • Number of updates: 132
  • Update frequency: every 25.6 days
  • Top authors: wpbean (100%)

Code review

54 tests

User reviews

35 reviews

Install metrics

6,000+ active /254,455 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
This plugin's installer ran successfully

Server metrics [RAM: ▲0.32MB] [CPU: ▲0.35ms] Passed 4 tests

Server-side resources used by WPB Product Slider for WooCommerce - Product Carousel
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.71 ▲0.2536.87 ▼3.78
Dashboard /wp-admin3.70 ▲0.4051.54 ▼0.76
Posts /wp-admin/edit.php3.75 ▲0.4054.91 ▲7.91
Add New Post /wp-admin/post-new.php6.19 ▲0.3182.96 ▼0.32
Media Library /wp-admin/upload.php3.54 ▲0.3138.80 ▲6.25
Settings /wp-admin/admin.php?page=wpb-wps-settings3.5339.81
Woo Slider /wp-admin/admin.php?page=wpb-wps-about3.5538.81

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

How much does this plugin use your filesystem and database?
The plugin installed successfully
Filesystem: 18 new files
Database: no new tables, 11 new options
New WordPress options
can_compress_scripts
theysaidso_admin_options
widget_wpb_woo_product_slider_widget
wpb_wps_slider_settings
wpb_wps_style
db_upgraded
widget_recent-posts
wpb_wps_advanced
wpb_wps_general
widget_theysaidso_widget
...

Browser metrics Passed 4 tests

Checking browser requirements for WPB Product Slider for WooCommerce - Product Carousel
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,992 ▲24614.99 ▲0.621.54 ▼0.1933.94 ▼10.74
Dashboard /wp-admin2,401 ▲2166.63 ▲1.55136.20 ▲31.3146.45 ▲2.45
Posts /wp-admin/edit.php2,303 ▲2143.62 ▲1.6350.72 ▲13.2335.79 ▲1.37
Add New Post /wp-admin/post-new.php1,559 ▲2623.21 ▲0.10645.40 ▼84.6736.84 ▼19.11
Media Library /wp-admin/upload.php1,443 ▲554.36 ▲0.1494.83 ▼18.7552.44 ▲6.49
Settings /wp-admin/admin.php?page=wpb-wps-settings2,0294.3483.9534.37
Woo Slider /wp-admin/admin.php?page=wpb-wps-about1,4423.3255.93320.46

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
It is recommended to fix the following
  • Zombie WordPress options detected upon uninstall: 11 options
    • widget_theysaidso_widget
    • widget_recent-comments
    • can_compress_scripts
    • wpb_wps_style
    • theysaidso_admin_options
    • wpb_wps_general
    • widget_recent-posts
    • widget_wpb_woo_product_slider_widget
    • db_upgraded
    • wpb_wps_slider_settings
    • ...

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Everything seems fine, however this is by no means 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
Please fix the following items
  • 5× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wpb-woocommerce-product-slider/inc/wpb-wps-widgets.php:14
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/wpb-woocommerce-product-slider/inc/wpb-wps-functions.php:32
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/wpb-woocommerce-product-slider/inc/wpb-wps-shortcodes.php:12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_enqueue_style() in wp-content/plugins/wpb-woocommerce-product-slider/admin/admin-page.php:11
    • > PHP Fatal error
      Uncaught Error: Class 'WeDevs_Settings_API' not found in wp-content/plugins/wpb-woocommerce-product-slider/admin/settings/wpb-wps-settings.php:15

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser errors were detected

Optimizations

Plugin configuration 90% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
6 plugin tags: woocommerce product carousel, woocommerce slider, product slider, woocommerce, woocommerce carousel...

wpb-woocommerce-product-slider/main.php 77% from 13 tests

Analyzing the main PHP file in "WPB Product Slider for WooCommerce - Product Carousel" version 2.0.9.7
You should first fix the following items:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("wpb-woocommerce-product-slider.php" instead of "main.php")
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 160 characters long)
  • Text Domain: The text domain is optional since WordPress version 4.6; if you do specify it, it must be the same as the plugin slug

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Good job! No executable or dangerous file extensions detected1,870 lines of code in 13 files:
LanguageFilesBlank linesComment linesLines of code
PHP82552661,154
CSS32728656
JavaScript28960

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.38
Average class complexity32.67
▷ Minimum class complexity3.00
▷ Maximum class complexity69.00
Average method complexity3.44
▷ Minimum method complexity1.00
▷ Maximum method complexity22.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods39
▷ Static methods00.00%
▷ Public methods39100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions20
▷ Named functions20100.00%
▷ Anonymous functions00.00%
Constants5
▷ Global constants5100.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
1 compressed PNG file occupies 0.00MB
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/img/grabbing.png0.11KB0.14KB0.00%