77% woo-product-carousel-slider-and-grid-ultimate

Code Review | Product Carousel Slider & Grid Ultimate for WooCommerce

WordPress plugin Product Carousel Slider & Grid Ultimate for WooCommerce scored77%from 54 tests.

About plugin

  • Plugin page: woo-product-carou...
  • Plugin version: 1.9.7
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-6.4
  • WordPress version: 6.3.1
  • First release: Oct 6, 2018
  • Latest release: Nov 14, 2023
  • Number of updates: 53
  • Update frequency: every 35.2 days
  • Top authors: aazztech (52.83%)armanul94 (49.06%)

Code review

54 tests

User reviews

32 reviews

Install metrics

9,000+ active /180,902 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▲0.55MB] [CPU: ▲7.03ms] Passed 4 tests

A check of server-side resources used by Product Carousel Slider & Grid Ultimate for WooCommerce
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /4.07 ▲0.6156.74 ▲13.62
Dashboard /wp-admin3.91 ▲0.5658.75 ▼1.23
Posts /wp-admin/edit.php3.94 ▲0.5763.18 ▲18.12
Add New Post /wp-admin/post-new.php6.42 ▲0.53103.21 ▲1.63
Media Library /wp-admin/upload.php3.77 ▲0.5447.96 ▲14.11
Usage & Support /wp-admin/edit.php?post_type=wcpcsu-custom-post&page=support3.7643.45
Add New /wp-admin/post-new.php?post_type=wcpcsu-custom-post4.0654.79
All Woocommerce Product Ultimate /wp-admin/edit.php?post_type=wcpcsu-custom-post3.8749.05

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 86 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_recent-posts
theysaidso_admin_options
widget_recent-comments
db_upgraded
widget_theysaidso_widget

Browser metrics Passed 4 tests

A check of browser resources used by Product Carousel Slider & Grid Ultimate for WooCommerce
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,242 ▲50623.73 ▲9.3633.57 ▲31.8538.51 ▼3.78
Dashboard /wp-admin2,360 ▲1809.66 ▲4.02111.17 ▲19.2175.23 ▲39.06
Posts /wp-admin/edit.php2,245 ▲1429.31 ▲7.3471.96 ▲33.4235.04 ▲0.34
Add New Post /wp-admin/post-new.php6,429 ▲4,90127.78 ▲4.69718.19 ▲85.0135.67 ▼24.17
Media Library /wp-admin/upload.php1,569 ▲17211.38 ▲7.19123.09 ▲24.4039.31 ▼2.55
Usage & Support /wp-admin/edit.php?post_type=wcpcsu-custom-post&page=support1,2999.2878.82123.16
Add New /wp-admin/post-new.php?post_type=wcpcsu-custom-post5,5248.77356.91111.08
All Woocommerce Product Ultimate /wp-admin/edit.php?post_type=wcpcsu-custom-post1,2989.4074.3352.66

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
These items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-posts
    • db_upgraded
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_theysaidso_widget

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though no errors were found, this is by no means an exhaustive test

SRP 0% 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
  • 3× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/woo-product-carousel-slider-and-grid-ultimate/main.php
    • > /wp-content/plugins/woo-product-carousel-slider-and-grid-ultimate/includes/template/quick-view.php
    • > /wp-content/plugins/woo-product-carousel-slider-and-grid-ultimate/includes/upgrade-pro.php
  • 27× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Warning
      Use of undefined constant WCPCSU_URL - assumed 'WCPCSU_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/woo-product-carousel-slider-and-grid-ultimate/includes/upgrade-pro.php on line 54
    • > PHP Notice
      Undefined variable: layout in wp-content/plugins/woo-product-carousel-slider-and-grid-ultimate/includes/template/theme/theme_2.php on line 1
    • > PHP Warning
      Use of undefined constant WCPCSU_URL - assumed 'WCPCSU_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/woo-product-carousel-slider-and-grid-ultimate/includes/upgrade-pro.php on line 58
    • > PHP Warning
      Use of undefined constant WCPCSU_URL - assumed 'WCPCSU_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/woo-product-carousel-slider-and-grid-ultimate/includes/upgrade-pro.php on line 62
    • > PHP Warning
      Use of undefined constant WCPCSU_URL - assumed 'WCPCSU_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/woo-product-carousel-slider-and-grid-ultimate/includes/upgrade-pro.php on line 46
    • > PHP Warning
      Use of undefined constant WCPCSU_URL - assumed 'WCPCSU_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/woo-product-carousel-slider-and-grid-ultimate/includes/upgrade-pro.php on line 59
    • > PHP Warning
      Use of undefined constant WCPCSU_URL - assumed 'WCPCSU_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/woo-product-carousel-slider-and-grid-ultimate/includes/upgrade-pro.php on line 57
    • > PHP Notice
      Undefined variable: layout in wp-content/plugins/woo-product-carousel-slider-and-grid-ultimate/includes/template/pagination.php on line 2
    • > PHP Warning
      Use of undefined constant WCPCSU_URL - assumed 'WCPCSU_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/woo-product-carousel-slider-and-grid-ultimate/includes/upgrade-pro.php on line 48
    • > PHP Warning
      Use of undefined constant WCPCSU_URL - assumed 'WCPCSU_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/woo-product-carousel-slider-and-grid-ultimate/includes/upgrade-pro.php on line 39

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser errors were detected

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
Please fix the following attributes:
  • Tags: You are using too many tags: 12 tag instead of maximum 10
You can look at the official readme.txt

woo-product-carousel-slider-and-grid-ultimate/main.php 85% from 13 tests

The main file in "Product Carousel Slider & Grid Ultimate for WooCommerce" v. 1.9.7 serves as a complement to information provided in readme.txt and as the entry point to the plugin
It is important to fix the following:
  • Requires at least: The required version number must match the one declared in readme.txt ("4.0" instead of "3.0")
  • Main file name: The principal plugin file should be the same as the plugin slug ("woo-product-carousel-slider-and-grid-ultimate.php" instead of "main.php")

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
No dangerous file extensions were detected11,699 lines of code in 80 files:
LanguageFilesBlank linesComment linesLines of code
PHP297418646,887
CSS73841012,664
Sass141025964
JavaScript58091828
XML600176
JSON100162
SVG180018

PHP code 50% from 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
Please fix the following
  • Cyclomatic complexity of methods has to be reduced to less than 100 (currently 183)
Cyclomatic complexity
Average complexity per logical line of code0.56
Average class complexity52.10
▷ Minimum class complexity2.00
▷ Maximum class complexity210.00
Average method complexity4.81
▷ Minimum method complexity1.00
▷ Maximum method complexity183.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes10
▷ Abstract classes00.00%
▷ Concrete classes10100.00%
▷ Final classes110.00%
Methods134
▷ Static methods42.99%
▷ Public methods9873.13%
▷ Protected methods75.22%
▷ Private methods2921.64%
Functions16
▷ Named functions1593.75%
▷ Anonymous functions16.25%
Constants9
▷ Global constants888.89%
▷ Class constants111.11%
▷ Public constants1100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
1 PNG file occupies 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
admin/img/star-support.png4.82KB2.63KB▼ 45.37%