93% product-carousel-slider-for-woocommerce

Code Review | WooCommerce Product Carousel Slider

WordPress plugin WooCommerce Product Carousel Slider scored 93% from 54 tests.

About plugin

  • Plugin page: product-carousel-...
  • Plugin version: 3.3.5
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-5.6
  • WordPress version: 5.9.2
  • First release: Nov 4, 2015
  • Latest release: Oct 19, 2021
  • Number of updates: 93
  • Update frequency: every 23.4 days
  • Top authors: AdlPlugins (79.57%)aazztech (19.35%)armanul94 (3.23%)

Code review

54 tests

User reviews

26 reviews

Install metrics

10,000+ active / 198,386 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▲0.21MB] [CPU: ▼293.53ms] Passed 4 tests

An overview of server-side resources used by WooCommerce Product Carousel Slider
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.81 ▲0.2953.77 ▲2.54
Dashboard /wp-admin3.64 ▲0.2333.44 ▲0.02
Posts /wp-admin/edit.php3.87 ▲0.2339.67 ▲3.00
Add New Post /wp-admin/post-new.php7.11 ▲0.1593.02 ▼1,171.18
Media Library /wp-admin/upload.php3.52 ▲0.2224.67 ▼5.49
Usage & Support /wp-admin/edit.php?post_type=woocarousel&page=support3.5024.42
Add New /wp-admin/post-new.php?post_type=woocarousel3.8039.42
Woo Carousel /wp-admin/edit.php?post_type=woocarousel3.6327.33

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

Filesystem and database footprint
The plugin installed successfully
Filesystem: 38 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

A check of browser resources used by WooCommerce Product Carousel Slider
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,854 ▲9615.53 ▼0.555.90 ▼0.742.89 ▲0.01
Dashboard /wp-admin2,949 ▲886.17 ▲0.01122.00 ▼10.89154.12 ▼6.73
Posts /wp-admin/edit.php2,748 ▲573.24 ▲0.0162.37 ▼1.16138.32 ▼8.49
Add New Post /wp-admin/post-new.php1,696 ▼6316.54 ▼5.29379.85 ▼60.13157.90 ▲7.66
Media Library /wp-admin/upload.php1,753 ▲555.56 ▼0.00136.57 ▼5.45188.76 ▼5.88
Usage & Support /wp-admin/edit.php?post_type=woocarousel&page=support1,3272.9157.66114.76
Add New /wp-admin/post-new.php?post_type=woocarousel6,1095.34151.78192.93
Woo Carousel /wp-admin/edit.php?post_type=woocarousel1,4633.2261.80126.03

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
This plugin's uninstaller ran successfully

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Good news, no errors were detected

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
  • 5× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/product-carousel-slider-for-woocommerce/wpcs-shortcodes.php
    • > /wp-content/plugins/product-carousel-slider-for-woocommerce/wpcs-main.php
    • > /wp-content/plugins/product-carousel-slider-for-woocommerce/wpcs-support.php
    • > /wp-content/plugins/product-carousel-slider-for-woocommerce/wpcs-upgrade.php
    • > /wp-content/plugins/product-carousel-slider-for-woocommerce/wpcs-custom-post.php

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
No browser errors were detected

Optimizations

Plugin configuration 86% from 29 tests

readme.txt Passed 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
5 plugin tags: woocommerce slider, woocommerce product slider, woocommerce carousel, woocommerce, woocommerce product carousel

product-carousel-slider-for-woocommerce/wpcs-main.php 69% from 13 tests

"WooCommerce Product Carousel Slider" version 3.3.5'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:
  • Requires at least: The required version number did not match the one declared in readme.txt ("4.0" instead of "3.0")
  • Description: Please keep the plugin description shorter than 140 characters (currently 170 characters long)
  • Main file name: Name the main plugin file the same as the plugin slug ("product-carousel-slider-for-woocommerce.php" instead of "wpcs-main.php")
  • 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
Success! There were no dangerous files found in this plugin4,295 lines of code in 23 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript44749131,921
PHP72561841,144
SVG100655
CSS118778575

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.41
Average class complexity42.50
▷ Minimum class complexity6.00
▷ Maximum class complexity83.00
Average method complexity7.64
▷ Minimum method complexity1.00
▷ Maximum method complexity71.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods25
▷ Static methods28.00%
▷ Public methods2288.00%
▷ Protected methods00.00%
▷ Private methods312.00%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
6 PNG files occupy 0.01MB with 0.01MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
css/owl.video.play.png4.86KB2.74KB▼ 43.61%
css/grabbing.png0.11KB0.14KB0.00%
css/rightArrow.png1.15KB0.33KB▼ 71.67%
css/title-bg.png0.97KB0.08KB▼ 91.73%
css/leftArrow.png1.16KB0.33KB▼ 71.26%