83% yith-woocommerce-product-slider-carousel

Code Review | YITH WooCommerce Product Slider Carousel

WordPress plugin YITH WooCommerce Product Slider Carousel scored83%from 54 tests.

About plugin

  • Plugin page: yith-woocommerce-...
  • Plugin version: 1.29.0
  • PHP version: 7.4.16
  • WordPress compatibility: 8.2-6.4
  • WordPress version: 6.3.1
  • First release: Jun 16, 2015
  • Latest release: Dec 1, 2023
  • Number of updates: 125
  • Update frequency: every 24.8 days
  • Top authors: yithemes (100%)

Code review

54 tests

User reviews

18 reviews

Install metrics

8,000+ active /280,826 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
This plugin's installer ran successfully

Server metrics [RAM: ▲0.02MB] [CPU: ▼4.36ms] Passed 4 tests

Analyzing server-side resources used by YITH WooCommerce Product Slider Carousel
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0348.82 ▲10.52
Dashboard /wp-admin3.33 ▲0.0347.48 ▼2.49
Posts /wp-admin/edit.php3.38 ▲0.0249.18 ▼0.43
Add New Post /wp-admin/post-new.php5.91 ▲0.0380.28 ▼13.69
Media Library /wp-admin/upload.php3.25 ▲0.0234.08 ▼0.81

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

How much does this plugin use your filesystem and database?
The plugin installed successfully
Filesystem: 341 new files
Database: no new tables, 7 new options
New WordPress options
theysaidso_admin_options
widget_recent-posts
widget_theysaidso_widget
widget_recent-comments
db_upgraded
can_compress_scripts
yit_recently_activated

Browser metrics Passed 4 tests

An overview of browser requirements for YITH WooCommerce Product Slider Carousel
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,796 ▲3414.34 ▼0.421.93 ▲0.1642.92 ▼1.56
Dashboard /wp-admin2,201 ▲215.60 ▼0.0489.05 ▼0.3941.34 ▼2.39
Posts /wp-admin/edit.php2,110 ▲101.96 ▼0.0634.40 ▼5.1830.91 ▼4.14
Add New Post /wp-admin/post-new.php1,532 ▲523.49 ▲0.09670.81 ▲29.6657.91 ▲7.99
Media Library /wp-admin/upload.php1,406 ▲64.17 ▼0.0196.31 ▼6.0042.81 ▼2.27

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • Zombie WordPress options detected upon uninstall: 7 options
    • can_compress_scripts
    • yit_recently_activated
    • widget_recent-posts
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 50% 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
  • 2× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/yith-woocommerce-product-slider-carousel/templates/admin/premium.php:136
    • > PHP Fatal error
      Uncaught Error: Call to undefined function yit_ie_version() in wp-content/plugins/yith-woocommerce-product-slider-carousel/templates/admin/lightbox.php:37

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 86% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
These attributes need to be fixed:
  • Tags: There are too many tags (17 tag instead of maximum 10)
Please take inspiration from this readme.txt

yith-woocommerce-product-slider-carousel/init.php 77% from 13 tests

The primary PHP file in "YITH WooCommerce Product Slider Carousel" version 1.29.0 is used by WordPress to initiate all plugin functionality
Please make the necessary changes and fix the following:
  • Description: Keep the plugin description shorter than 140 characters (currently 273 characters long)
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("yith-woocommerce-product-slider-carousel.php" instead of "init.php")
  • Requires at least: Required version does not match the one declared in readme.txt ("6.2" instead of "8.2")

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
Success! There were no dangerous files found in this plugin47,056 lines of code in 266 files:
LanguageFilesBlank linesComment linesLines of code
PHP1722,7385,35315,574
CSS222,21728912,295
JavaScript561,8671,84811,410
PO File61,5661,9204,307
SVG9013,430
XML112940

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.50
Average class complexity41.93
▷ Minimum class complexity1.00
▷ Maximum class complexity336.00
Average method complexity4.01
▷ Minimum method complexity1.00
▷ Maximum method complexity42.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes29
▷ Abstract classes13.45%
▷ Concrete classes2896.55%
▷ Final classes00.00%
Methods382
▷ Static methods5213.61%
▷ Public methods30980.89%
▷ Protected methods5313.87%
▷ Private methods205.24%
Functions140
▷ Named functions13294.29%
▷ Anonymous functions85.71%
Constants19
▷ Global constants1894.74%
▷ Class constants15.26%
▷ Public constants1100.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
51 PNG files occupy 0.57MB with 0.26MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
plugin-fw/assets/images/colorbox/border1.png0.61KB0.82KB0.00%
plugin-fw/assets/images/double-sidebar.png0.95KB0.12KB▼ 87.73%
plugin-fw/assets/images/licence-error.png1.61KB0.94KB▼ 41.62%
assets/images/03-icon.png1.82KB1.14KB▼ 37.39%
assets/images/02.png73.10KB27.42KB▼ 62.49%