72% product-slider-carousel

Code Review | FancyProduct - Product Carousel, Slider, Gallery, Grid With WordPress Carousel – Category Carousel & Slider, Cross-Sell, and Related Products for WooCommerce

WordPress plugin FancyProduct - Product Carousel, Slider, Gallery, Grid With WordPress Carousel – Category Carousel & Slider, Cross-Sell, and Related Products for WooCommerce scored72%from 54 tests.

About plugin

  • Plugin page: product-slider-ca...
  • Plugin version: 2.1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-6.2
  • WordPress version: 6.3.1
  • First release: May 28, 2020
  • Latest release: Jun 20, 2023
  • Number of updates: 32
  • Update frequency: every 35.2 days
  • Top authors: frohadpro (59.38%)grandplugin (43.75%)

Code review

54 tests

User reviews

7 reviews

Install metrics

400+ active /8,191 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
Install script ran successfully

Server metrics [RAM: ▲1.18MB] [CPU: ▲1.40ms] Passed 4 tests

This is a short check of server-side resources used by FancyProduct - Product Carousel, Slider, Gallery, Grid With WordPress Carousel – Category Carousel & Slider, Cross-Sell, and Related Products for WooCommerce
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /4.58 ▲1.1137.56 ▼1.99
Dashboard /wp-admin4.50 ▲1.2060.94 ▲15.04
Posts /wp-admin/edit.php4.55 ▲1.2053.63 ▲6.34
Add New Post /wp-admin/post-new.php7.11 ▲1.2294.99 ▼9.06
Media Library /wp-admin/upload.php4.42 ▲1.2047.22 ▲10.32
Add New /wp-admin/post-new.php?post_type=gpsc_slider_carousel7.3554.63
Manage Sliders /wp-admin/edit.php?post_type=gpsc_slider_carousel7.3654.36
Help /wp-admin/edit.php?post_type=gpsc_slider_carousel&page=gpsc_help_page7.2852.88
Settings /wp-admin/edit.php?post_type=gpsc_slider_carousel&page=wpgpscsc_settings7.2880.84

Server storage [IO: ▲2.44MB] [DB: ▲0.01MB] Passed 3 tests

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 110 new files
Database: no new tables, 7 new options
New WordPress options
can_compress_scripts
_wpgpsc_option_settings
db_upgraded
widget_theysaidso_widget
widget_recent-comments
widget_recent-posts
theysaidso_admin_options

Browser metrics Passed 4 tests

A check of browser resources used by FancyProduct - Product Carousel, Slider, Gallery, Grid With WordPress Carousel – Category Carousel & Slider, Cross-Sell, and Related Products for WooCommerce
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,486 ▼26013.20 ▼1.390.52 ▼1.2018.51 ▼26.83
Dashboard /wp-admin2,227 ▲424.86 ▼0.9698.54 ▼6.1237.49 ▼6.14
Posts /wp-admin/edit.php2,122 ▲332.05 ▲0.0435.59 ▼4.5429.13 ▼8.03
Add New Post /wp-admin/post-new.php1,553 ▲2018.31 ▼4.83624.81 ▼37.0776.08 ▲22.82
Media Library /wp-admin/upload.php1,424 ▲364.10 ▲0.0196.27 ▼4.5645.43 ▲2.70
Add New /wp-admin/post-new.php?post_type=gpsc_slider_carousel4,3356.47180.93134.30
Manage Sliders /wp-admin/edit.php?post_type=gpsc_slider_carousel1,3064.2256.3227.66
Help /wp-admin/edit.php?post_type=gpsc_slider_carousel&page=gpsc_help_page1,78214.15282.92128.29
Settings /wp-admin/edit.php?post_type=gpsc_slider_carousel&page=wpgpscsc_settings3,4705.1790.3145.77

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
The following items require your attention
  • Zombie WordPress options were found after uninstall: 7 options
    • widget_recent-comments
    • db_upgraded
    • widget_theysaidso_widget
    • _wpgpsc_option_settings
    • widget_recent-posts
    • theysaidso_admin_options
    • can_compress_scripts

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Almost there, just fix the following server-side errors
  • 4 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=gpsc_slider_carousel
    • > Notice in wp-content/plugins/product-slider-carousel/admin/wpgpsc-framework/metabox/general.php+306
    Trying to get property 'name' of non-object

SRP 0% from 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
The following issues need your attention
  • 1× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/product-slider-carousel/admin/partials/gpsc-product-slider-carousel-admin-display.php
  • 9× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wc_get_products() in wp-content/plugins/product-slider-carousel/public/modules/gpsc-product-grid.php:28
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_enqueue_style() in wp-content/plugins/product-slider-carousel/public/modules/gpsc-product-carousel.php:15
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wpgpsc_get_options() in wp-content/plugins/product-slider-carousel/public/class-gpsc-product-slider-carousel-dynamic-styles.php:35
    • > PHP Notice
      Undefined variable: wpgpscsc_product_limit in wp-content/plugins/product-slider-carousel/public/modules/gpsc-product-grid.php on line 22
    • > PHP Notice
      Undefined variable: wpgpscsc_product_by in wp-content/plugins/product-slider-carousel/public/modules/gpsc-product-grid.php on line 23
    • > PHP Notice
      Undefined variable: wpgpscsc_product_by in wp-content/plugins/product-slider-carousel/public/modules/gpsc-product-grid.php on line 21
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_url() in wp-content/plugins/product-slider-carousel/admin/partials/gpsc-product-slider-carousel-admin-display.php:244
    • > PHP Notice
      Undefined variable: wpgpscsc_product_order in wp-content/plugins/product-slider-carousel/public/modules/gpsc-product-grid.php on line 25
    • > PHP Notice
      Undefined variable: wpgpscsc_product_orderby in wp-content/plugins/product-slider-carousel/public/modules/gpsc-product-grid.php on line 24

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 93% 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
10 plugin tags: related products, best carousel plugin, woocommerce carousel, product slider, fancyproduct...

product-slider-carousel/gpsc-product-slider-carousel.php 85% from 13 tests

The principal PHP file in "FancyProduct - Product Carousel, Slider, Gallery, Grid With WordPress Carousel – Category Carousel & Slider, Cross-Sell, and Related Products for WooCommerce" v. 2.1.0 is loaded by WordPress automatically on each request
It is important to fix the following:
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("product-slider-carousel.php" instead of "gpsc-product-slider-carousel.php")

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
Success! There were no dangerous files found in this plugin21,953 lines of code in 88 files:
LanguageFilesBlank linesComment linesLines of code
PHP661,6371,5867,521
JavaScript91,3025466,579
CSS94295595,161
SVG4002,692

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.57
Average class complexity23.22
▷ Minimum class complexity1.00
▷ Maximum class complexity150.00
Average method complexity6.55
▷ Minimum method complexity1.00
▷ Maximum method complexity57.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes41
▷ Abstract classes24.88%
▷ Concrete classes3995.12%
▷ Final classes00.00%
Methods166
▷ Static methods3018.07%
▷ Public methods16096.39%
▷ Protected methods00.00%
▷ Private methods63.61%
Functions24
▷ Named functions24100.00%
▷ Anonymous functions00.00%
Constants5
▷ Global constants480.00%
▷ Class constants120.00%
▷ Public constants1100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
8 PNG files occupy 0.01MB with 0.00MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
admin/wpgpsc-framework/assets/images/checkerboard.png2.29KB2.54KB0.00%
admin/img/client-3.png0.37KB0.12KB▼ 67.54%
admin/img/client-2.png0.39KB0.15KB▼ 61.50%
admin/img/carousel-icon.png1.70KB1.13KB▼ 33.06%
admin/img/grid-icon.png0.98KB0.65KB▼ 34.16%