84% carousel-slider

Code Review | Carousel Slider

WordPress plugin Carousel Slider scored84%from 54 tests.

About plugin

  • Plugin page: carousel-slider
  • Plugin version: 2.2.5
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.6-6.4
  • WordPress version: 6.3.1
  • First release: Jun 30, 2014
  • Latest release: Nov 12, 2023
  • Number of updates: 153
  • Update frequency: every 22.4 days
  • Top authors: sayful (100%)

Code review

54 tests

User reviews

150 reviews

Install metrics

40,000+ active /816,090 total downloads

Benchmarks

Plugin footprint 82% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Install script ran successfully

Server metrics [RAM: ▲0.19MB] [CPU: ▼0.38ms] Passed 4 tests

Server-side resources used by Carousel Slider
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.65 ▲0.1939.52 ▲4.32
Dashboard /wp-admin3.50 ▲0.2047.90 ▼5.46
Posts /wp-admin/edit.php3.55 ▲0.1952.44 ▲8.71
Add New Post /wp-admin/post-new.php6.10 ▲0.2188.42 ▼5.12
Media Library /wp-admin/upload.php3.43 ▲0.2036.65 ▲4.76
Settings /wp-admin/edit.php?post_type=carousels&page=settings3.5139.02
All Sliders /wp-admin/edit.php?post_type=carousels3.4735.82
Documentation /wp-admin/edit.php?post_type=carousels&page=carousel-slider-documentation3.4232.77
Add New /wp-admin/post-new.php?post_type=carousels3.4863.62

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

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

Browser metrics 75% from 4 tests

An overview of browser requirements for Carousel Slider
Having an awesome user experience is important, so please improve the following
  • Script duration: Try to keep JavaScript execution under 1,500.00ms (currently 1,939.93ms on /wp-admin/edit.php?post_type=carousels&page=carousel-slider-documentation)
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,973 ▲21114.36 ▼0.011.69 ▼0.0144.83 ▲1.77
Dashboard /wp-admin2,381 ▲2015.69 ▲0.1490.06 ▼14.7141.44 ▼3.22
Posts /wp-admin/edit.php2,287 ▲1872.17 ▲0.1742.85 ▲4.8836.20 ▲1.95
Add New Post /wp-admin/post-new.php6,338 ▲4,81218.90 ▼4.25961.25 ▲284.0352.02 ▼7.34
Media Library /wp-admin/upload.php1,586 ▲1924.31 ▲0.10102.98 ▲4.2146.26 ▲4.81
Settings /wp-admin/edit.php?post_type=carousels&page=settings1,2713.8259.8129.00
All Sliders /wp-admin/edit.php?post_type=carousels1,2391.9935.3931.68
Documentation /wp-admin/edit.php?post_type=carousels&page=carousel-slider-documentation6,12574.221,939.9376.46
Add New /wp-admin/post-new.php?post_type=carousels1,8434.28105.6257.62

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • Zombie WordPress options detected upon uninstall: 7 options
    • widget_widget_carousel_slider
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • can_compress_scripts
    • db_upgraded
    • widget_recent-posts
    • widget_recent-comments

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 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please fix the following items
  • 29× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'CarouselSlider\\REST\\ApiController' not found in wp-content/plugins/carousel-slider/modules/HeroCarousel/Controller.php:16
    • > PHP Fatal error
      Uncaught Error: Class 'CarouselSlider\\Supports\\FormFields\\BaseField' not found in wp-content/plugins/carousel-slider/includes/Supports/FormFields/Select.php:10
    • > PHP Fatal error
      Uncaught Error: Class 'CarouselSlider\\Supports\\FormFields\\BaseField' not found in wp-content/plugins/carousel-slider/includes/Supports/FormFields/Color.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'CarouselSlider\\Supports\\FormFields\\BaseField' not found in wp-content/plugins/carousel-slider/includes/Supports/FormFields/ImagesGallery.php:8
    • > PHP Fatal error
      Uncaught Error: Interface 'CarouselSlider\\Interfaces\\TemplateParserInterface' not found in wp-content/plugins/carousel-slider/includes/TemplateParserBase.php:12
    • > PHP Fatal error
      Uncaught Error: Class 'CarouselSlider\\Supports\\FormFields\\BaseField' not found in wp-content/plugins/carousel-slider/includes/Supports/FormFields/ImageUploader.php:10
    • > PHP Fatal error
      Uncaught Error: Class 'CarouselSlider\\Supports\\FormFields\\BaseField' not found in wp-content/plugins/carousel-slider/includes/Supports/FormFields/Breakpoint.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'CarouselSlider\\Supports\\FormFields\\Select' not found in wp-content/plugins/carousel-slider/includes/Supports/FormFields/SelectTerms.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'CarouselSlider\\Supports\\FormFields\\BaseField' not found in wp-content/plugins/carousel-slider/includes/Supports/FormFields/Html.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'CarouselSlider\\Supports\\FormFields\\BaseField' not found in wp-content/plugins/carousel-slider/includes/Supports/FormFields/Radio.php:8

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side

Optimizations

Plugin configuration 96% from 29 tests

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

carousel-slider/carousel-slider.php 92% from 13 tests

Analyzing the main PHP file in "Carousel Slider" version 2.2.5
It is important to fix the following:
  • Description: The description should be shorter than 140 characters (currently 331 characters long)

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
No dangerous file extensions were detected10,717 lines of code in 127 files:
LanguageFilesBlank linesComment linesLines of code
PHP1112,0615,16310,598
SVG200105
JavaScript8028
CSS6006

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.32
Average class complexity9.84
▷ Minimum class complexity1.00
▷ Maximum class complexity49.00
Average method complexity2.40
▷ Minimum method complexity1.00
▷ Maximum method complexity14.00
Code structure
Namespaces20
Interfaces5
Traits1
Classes96
▷ Abstract classes33.12%
▷ Concrete classes9396.88%
▷ Final classes11.08%
Methods655
▷ Static methods18928.85%
▷ Public methods57587.79%
▷ Protected methods345.19%
▷ Private methods467.02%
Functions10
▷ Named functions00.00%
▷ Anonymous functions10100.00%
Constants14
▷ Global constants857.14%
▷ Class constants642.86%
▷ Public constants6100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
No PNG images were found in this plugin