89% wpb-woocommerce-related-products-slider

Code Review | WPB Related Products Slider for WooCommerce - Show WooCommerce Related Products in Slider

WordPress plugin WPB Related Products Slider for WooCommerce - Show WooCommerce Related Products in Slider scored89%from 54 tests.

About plugin

  • Plugin page: wpb-woocommerce-r...
  • Plugin version: 1.3.6
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.3.1
  • WordPress version: 6.3.1
  • First release: Nov 25, 2015
  • Latest release: Aug 29, 2023
  • Number of updates: 63
  • Update frequency: every 45.0 days
  • Top authors: wpbean (100%)

Code review

54 tests

User reviews

11 reviews

Install metrics

1,000+ active /38,374 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.16MB] [CPU: ▼2.54ms] Passed 4 tests

Server-side resources used by WPB Related Products Slider for WooCommerce - Show WooCommerce Related Products in Slider
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.59 ▲0.1340.74 ▼3.81
Dashboard /wp-admin3.53 ▲0.2354.08 ▲4.41
Posts /wp-admin/edit.php3.58 ▲0.2353.13 ▼0.34
Add New Post /wp-admin/post-new.php6.03 ▲0.1485.26 ▼10.40
Media Library /wp-admin/upload.php3.37 ▲0.1439.74 ▲5.85
WPB Related Products Slider /wp-admin/options-general.php?page=wpb_wrps_product_slider3.3738.25

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 20 new files
Database: no new tables, 7 new options
New WordPress options
can_compress_scripts
wpb_wrps_general
db_upgraded
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-comments
widget_recent-posts

Browser metrics Passed 4 tests

This is an overview of browser requirements for WPB Related Products Slider for WooCommerce - Show WooCommerce Related Products in Slider
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,070 ▲28415.20 ▲0.665.67 ▲3.6635.89 ▼6.07
Dashboard /wp-admin2,363 ▲1866.31 ▲0.70113.61 ▲26.8843.36 ▼0.45
Posts /wp-admin/edit.php2,291 ▲1883.63 ▲1.6152.13 ▲8.7938.68 ▲0.94
Add New Post /wp-admin/post-new.php1,551 ▲2523.21 ▲0.26648.29 ▼54.3437.35 ▼14.90
Media Library /wp-admin/upload.php1,434 ▲374.32 ▲0.0886.52 ▼12.2943.48 ▼2.85
WPB Related Products Slider /wp-admin/options-general.php?page=wpb_wrps_product_slider1,2003.5449.9347.73

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • Zombie WordPress options were found after uninstall: 7 options
    • widget_recent-comments
    • wpb_wrps_general
    • can_compress_scripts
    • db_upgraded
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_theysaidso_widget

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
The smoke test was a success, however most plugin functionality was not tested

SRP Passed 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Everything seems fine, however this is by no means an exhaustive test

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side

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
8 plugin tags: products slider, woocommerce, custom related products, related products, slider...

wpb-woocommerce-related-products-slider/main.php 85% from 13 tests

Analyzing the main PHP file in "WPB Related Products Slider for WooCommerce - Show WooCommerce Related Products in Slider" version 1.3.6
It is important to fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("wpb-woocommerce-related-products-slider.php" instead of "main.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 Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
No dangerous file extensions were detected1,120 lines of code in 12 files:
LanguageFilesBlank linesComment linesLines of code
PHP6238258655
CSS32329405
JavaScript23544
SVG10016

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.37
Average class complexity26.00
▷ Minimum class complexity3.00
▷ Maximum class complexity49.00
Average method complexity2.47
▷ Minimum method complexity1.00
▷ Maximum method complexity15.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods34
▷ Static methods00.00%
▷ Public methods34100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions16
▷ Named functions16100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
1 compressed PNG file occupies 0.00MB
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/images/grabbing.png0.11KB0.14KB0.00%