63% wp-carousel-free

Code Review | Carousel, Slider, Gallery by WP Carousel - Image Carousel & Photo Gallery, Post Carousel & Post Grid, Product Carousel & Product Grid for WooCommerce

WordPress plugin Carousel, Slider, Gallery by WP Carousel - Image Carousel & Photo Gallery, Post Carousel & Post Grid, Product Carousel & Product Grid for WooCommerce scored63%from 54 tests.

About plugin

  • Plugin page: wp-carousel-free
  • Plugin version: 2.5.10
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-6.4.1
  • WordPress version: 6.3.1
  • First release: Jul 30, 2014
  • Latest release: Nov 9, 2023
  • Number of updates: 139
  • Update frequency: every 24.4 days
  • Top authors: rubel_miah (47.48%)shapedplugin (46.04%)lazypersons (5.04%)Shamimmiashuhagh (3.6%)

Code review

54 tests

User reviews

328 reviews

Install metrics

60,000+ active /1,158,300 total downloads

Benchmarks

Plugin footprint 48% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
This plugin's installer ran successfully

Server metrics [RAM: ▲1.57MB] [CPU: ▲7.20ms] Passed 4 tests

Server-side resources used by Carousel, Slider, Gallery by WP Carousel - Image Carousel & Photo Gallery, Post Carousel & Post Grid, Product Carousel & Product Grid for WooCommerce
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /5.02 ▲1.5648.57 ▲5.72
Dashboard /wp-admin4.91 ▲1.6157.95 ▲7.99
Posts /wp-admin/edit.php4.96 ▲1.6059.68 ▲14.75
Add New Post /wp-admin/post-new.php7.46 ▲1.5896.50 ▲0.32
Media Library /wp-admin/upload.php4.77 ▲1.5449.45 ▲15.30
Add New /wp-admin/post-new.php?post_type=sp_wp_carousel4.9475.90
All Carousels /wp-admin/edit.php?post_type=sp_wp_carousel4.9358.32
Settings /wp-admin/edit.php?post_type=sp_wp_carousel&page=wpcp_settings4.7846.02
Tools /wp-admin/edit.php?post_type=sp_wp_carousel&page=wpcf_tools4.7852.12
Help /wp-admin/edit.php?post_type=sp_wp_carousel&page=wpcf_help4.7851.73

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 177 new files
Database: no new tables, 8 new options
New WordPress options
sp_wpcp_settings
theysaidso_admin_options
widget_recent-comments
sp_wp_carousel_free_review_notice_dismiss
db_upgraded
widget_theysaidso_widget
widget_recent-posts
can_compress_scripts

Browser metrics Passed 4 tests

This is an overview of browser requirements for Carousel, Slider, Gallery by WP Carousel - Image Carousel & Photo Gallery, Post Carousel & Post Grid, Product Carousel & Product Grid for WooCommerce
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,915 ▲15314.33 ▼0.021.75 ▼0.0327.39 ▼20.17
Dashboard /wp-admin2,317 ▲1435.66 ▲0.0985.04 ▼12.5441.89 ▲1.36
Posts /wp-admin/edit.php2,229 ▲1292.06 ▲0.0441.39 ▲3.1536.71 ▲0.47
Add New Post /wp-admin/post-new.php6,249 ▲4,72319.04 ▼4.29828.09 ▲162.6634.64 ▼16.06
Media Library /wp-admin/upload.php1,528 ▲1284.33 ▲0.1798.80 ▼0.1545.04 ▲1.01
Add New /wp-admin/post-new.php?post_type=sp_wp_carousel7,7525.88248.47218.20
All Carousels /wp-admin/edit.php?post_type=sp_wp_carousel1,4504.1969.4132.15
Settings /wp-admin/edit.php?post_type=sp_wp_carousel&page=wpcp_settings1,6024.0766.6639.54
Tools /wp-admin/edit.php?post_type=sp_wp_carousel&page=wpcf_tools1,2694.2471.8292.51
Help /wp-admin/edit.php?post_type=sp_wp_carousel&page=wpcf_help2,08910.83330.93151.90

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
  • Uninstall procedure had uncaught errors
    • > Compile error in wp-content/plugins/wp-carousel-free/wp-carousel-free.php+335
    Cannot redeclare sp_wpcf() (previously declared in wp-content/plugins/wp-carousel-free/wp-carousel-free.php:336)
  • The plugin did not uninstall correctly, leaving 177 files (2.32MB) in the plugin directory
    • (new file) admin/ElementAddons/Wp_Carousel_Shortcode_Widget.php
    • (new file) admin/css/fontello.css
    • (new file) admin/class-wp-carousel-free-elementor-block.php
    • (new file) admin/class-wp-carousel-free-admin.php
    • (new file) admin/GutenbergBlock/build/index.asset.php
    • (new file) admin/GutenbergBlock/assets/wp-carousel-icon.svg
    • (new file) admin/GutenbergBlock/assets/wpc-block-preview.svg
    • (new file) admin/class-wp-carousel-free-gutenberg-block.php
    • (new file) admin/GutenbergBlock/build/index.js
    • (new file) admin/GutenbergBlock/class-wp-carousel-free-gutenberg-block-init.php
    • ...
  • This plugin did not uninstall successfully, leaving 9 options in the database
    • recovery_mode_email_last_sent
    • widget_recent-posts
    • sp_wp_carousel_free_review_notice_dismiss
    • db_upgraded
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • sp_wpcp_settings
    • widget_recent-comments
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for 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 take a closer look at the following
  • 49× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Notice
      Undefined variable: post_id in wp-content/plugins/wp-carousel-free/public/dynamic-style.php on line 69
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_kses_post() in wp-content/plugins/wp-carousel-free/public/templates/section-title.php:13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/wp-carousel-free/public/shortcode-deprecated.php:207
    • > PHP Notice
      Undefined variable: post_id in wp-content/plugins/wp-carousel-free/public/dynamic-style.php on line 49
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wp-carousel-free/admin/views/notices/class-wp-carousel-free-promotion.php:24
    • > PHP Notice
      Undefined variable: product in wp-content/plugins/wp-carousel-free/public/templates/loop/product-type/price.php on line 12
    • > PHP Notice
      Undefined variable: post_id in wp-content/plugins/wp-carousel-free/public/dynamic-style.php on line 168
    • > PHP Fatal error
      Uncaught Error: Call to undefined function update_option() in wp-content/plugins/wp-carousel-free/includes/updates/update-2.4.7.php:15
    • > PHP Notice
      Undefined variable: post_id in wp-content/plugins/wp-carousel-free/public/dynamic-style.php on line 62
    • > PHP Notice
      Undefined variable: post_id in wp-content/plugins/wp-carousel-free/public/dynamic-style.php on line 86

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)
Everything seems fine on the user side

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
Attributes that need to be fixed:
  • Tags: Please reduce the number of tags, currently 41 tag instead of maximum 10
You can look at the official readme.txt

wp-carousel-free/wp-carousel-free.php 85% from 13 tests

The primary PHP file in "Carousel, Slider, Gallery by WP Carousel - Image Carousel & Photo Gallery, Post Carousel & Post Grid, Product Carousel & Product Grid for WooCommerce" version 2.5.10 is used by WordPress to initiate all plugin functionality
It is important to fix the following:
  • Description: Please don't use more than 140 characters for the plugin description (currently 207 characters long)
  • Requires at least: The required version number must match the one declared in readme.txt ("5.0" instead of "4.0")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
There were no executable files found in this plugin19,430 lines of code in 156 files:
LanguageFilesBlank linesComment linesLines of code
PHP871,6563,3688,164
CSS157545854,547
JavaScript179573493,609
SVG370143,110

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.59
Average class complexity24.39
▷ Minimum class complexity1.00
▷ Maximum class complexity154.00
Average method complexity6.68
▷ Minimum method complexity1.00
▷ Maximum method complexity96.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes51
▷ Abstract classes23.92%
▷ Concrete classes4996.08%
▷ Final classes00.00%
Methods211
▷ Static methods3717.54%
▷ Public methods20094.79%
▷ Protected methods20.95%
▷ Private methods94.27%
Functions19
▷ Named functions1894.74%
▷ Anonymous functions15.26%
Constants7
▷ Global constants7100.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
3 compressed PNG files occupy 0.02MB
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
admin/views/sp-framework/assets/images/checkerboard.png2.29KB2.54KB0.00%
admin/img/wpcp-icon-256.png5.64KB5.62KB0.33%
admin/img/images/Joyce-van-den-Berg.png10.73KB10.72KB0.04%