67% carousels-slider-for-divi

Code Review | Divi Carousel Lite - 17+ Carousel Module

WordPress plugin Divi Carousel Lite - 17+ Carousel Module scored67%from 54 tests.

About plugin

  • Plugin page: carousels-slider-...
  • Plugin version: 1.6.2
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.2
  • WordPress version: 6.3.1
  • First release: Aug 12, 2022
  • Latest release: Nov 30, 2023
  • Number of updates: 105
  • Update frequency: every 4.5 days
  • Top authors: divicarousels (100%)

Code review

54 tests

User reviews

8 reviews

Install metrics

1,000+ active /9,344 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▲5.43MB] [CPU: ▲23.96ms] 75% from 4 tests

Analyzing server-side resources used by Divi Carousel Lite - 17+ Carousel Module
Please have a look at the following items
  • Extra RAM: Try to keep extra memory usage under 5MB (currently 5.43MB on /wp-admin/admin.php?page=freemius)
PageMemory (MB)CPU Time (ms)
Home /9.29 ▲5.8270.02 ▲27.52
Dashboard /wp-admin9.31 ▲6.0069.50 ▲19.23
Posts /wp-admin/edit.php9.31 ▲5.9568.86 ▲21.95
Add New Post /wp-admin/post-new.php9.85 ▲3.96118.14 ▲27.13
Media Library /wp-admin/upload.php9.31 ▲6.0867.30 ▲36.48
Freemius Debug [v.2.5.3] /wp-admin/admin.php?page=freemius9.3156.48

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 263 new files
Database: no new tables, 10 new options
New WordPress options
fs_active_plugins
fs_debug_mode
theysaidso_admin_options
widget_recent-posts
widget_recent-comments
db_upgraded
fs_gdpr
can_compress_scripts
widget_theysaidso_widget
fs_accounts

Browser metrics Passed 4 tests

Divi Carousel Lite - 17+ Carousel Module: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,936 ▲17413.87 ▼0.839.55 ▲7.8246.67 ▲2.57
Dashboard /wp-admin2,222 ▲415.52 ▼0.1783.76 ▼19.4759.84 ▲22.94
Posts /wp-admin/edit.php2,140 ▲371.97 ▼0.0339.64 ▼5.9532.18 ▼2.55
Add New Post /wp-admin/post-new.php1,701 ▲17521.13 ▼2.01784.55 ▲156.2254.23 ▲2.73
Media Library /wp-admin/upload.php1,436 ▲364.22 ▼0.0197.28 ▼5.5662.18 ▲16.25
Freemius Debug [v.2.5.3] /wp-admin/admin.php?page=freemius1,0911.6528.2433.92

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
You still need to fix the following
  • Uninstall procedure had uncaught errors
    • > Notice in wp-content/plugins/carousels-slider-for-divi/freemius/includes/class-freemius.php+8772
    Undefined property: stdClass::$plugins
  • This plugin does not fully uninstall, leaving 10 options in the database
    • can_compress_scripts
    • fs_accounts
    • widget_recent-comments
    • widget_recent-posts
    • fs_debug_mode
    • widget_theysaidso_widget
    • fs_active_plugins
    • fs_gdpr
    • theysaidso_admin_options
    • db_upgraded

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP 0% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please fix the following items
  • 2× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/carousels-slider-for-divi/admin/partials/divicarousel8-admin-display.php
    • > /wp-content/plugins/carousels-slider-for-divi/public/partials/divicarousel8-public-display.php
  • 25× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Warning
      Use of undefined constant DCS_DIVICAROUSEL_PATH - assumed 'DCS_DIVICAROUSEL_PATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/carousels-slider-for-divi/includes/modules/ImageCarouselItem/ImageCarouselItem.php on line 2
    • > PHP Warning
      Use of undefined constant DCS_DIVICAROUSEL_PATH - assumed 'DCS_DIVICAROUSEL_PATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/carousels-slider-for-divi/includes/modules/LogoCarousel/LogoCarousel.php on line 3
    • > PHP Warning
      Use of undefined constant DCS_DIVICAROUSEL_PATH - assumed 'DCS_DIVICAROUSEL_PATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/carousels-slider-for-divi/includes/modules/LogoCarousel/LogoCarousel.php on line 2
    • > PHP Warning
      include_once(): Failed opening 'DCS_DIVICAROUSEL_PATH/includes/modules/base/base.php' for inclusion (include_path='.:/usr/share/php') in wp-content/plugins/carousels-slider-for-divi/includes/modules/LogoCarouselItem/LogoCarouselItem.php on line 2
    • > PHP Warning
      include_once(DCS_DIVICAROUSEL_PATH/includes/modules/base/base.php): failed to open stream: No such file or directory in wp-content/plugins/carousels-slider-for-divi/includes/modules/ImageCarousel/ImageCarousel.php on line 2
    • > PHP Fatal error
      Uncaught Error: Class 'ET_Builder_Module' not found in wp-content/plugins/carousels-slider-for-divi/includes/modules/LogoCarouselItem/LogoCarouselItem.php:3
    • > PHP Warning
      include_once(): Failed opening 'DCS_DIVICAROUSEL_PATH/includes/modules/base/base.php' for inclusion (include_path='.:/usr/share/php') in wp-content/plugins/carousels-slider-for-divi/includes/modules/ImageCarousel/ImageCarousel.php on line 2
    • > PHP Warning
      include_once(DCS_DIVICAROUSEL_PATH/includes/modules/base/utils.php): failed to open stream: No such file or directory in wp-content/plugins/carousels-slider-for-divi/includes/modules/ImageCarousel/ImageCarousel.php on line 3
    • > PHP Fatal error
      Uncaught Error: Class 'ET_Builder_Module' not found in wp-content/plugins/carousels-slider-for-divi/includes/modules/TestimonialCarouselItemDivi8/TestimonialCarouselItemDivi8.php:3
    • > PHP Warning
      Use of undefined constant DCS_DIVICAROUSEL_PATH - assumed 'DCS_DIVICAROUSEL_PATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/carousels-slider-for-divi/includes/modules/LogoCarouselItem/LogoCarouselItem.php on line 2

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser issues were found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
8 plugin tags: testimonial carousel, logo carousel, divi builder, divi, divi carousel...

carousels-slider-for-divi/csfd-carousels-slider-for-divi.php 85% from 13 tests

"Divi Carousel Lite - 17+ Carousel Module" version 1.6.2's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
Please take the time to fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("carousels-slider-for-divi.php" instead of "csfd-carousels-slider-for-divi.php")
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6

Code Analysis 97% from 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 plugin43,618 lines of code in 191 files:
LanguageFilesBlank linesComment linesLines of code
PHP1388,27517,75737,222
CSS226802155,485
SVG1800422
JavaScript1153131251
JSX2378238

PHP code 50% from 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
These items need your attention
  • Cyclomatic complexity of classes has to be reduced to less than 1000 (currently 3,089)
Cyclomatic complexity
Average complexity per logical line of code0.60
Average class complexity71.89
▷ Minimum class complexity1.00
▷ Maximum class complexity3,089.00
Average method complexity4.51
▷ Minimum method complexity1.00
▷ Maximum method complexity94.00
Code structure
Namespaces0
Interfaces0
Traits1
Classes63
▷ Abstract classes23.17%
▷ Concrete classes6196.83%
▷ Final classes00.00%
Methods1,323
▷ Static methods20115.19%
▷ Public methods93570.67%
▷ Protected methods171.28%
▷ Private methods37128.04%
Functions97
▷ Named functions97100.00%
▷ Anonymous functions00.00%
Constants152
▷ Global constants10569.08%
▷ Class constants4730.92%
▷ Public constants47100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
20 PNG files occupy 0.15MB with 0.05MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
admin/img/team-carousel-icon.png5.40KB3.62KB▼ 32.89%
admin/img/icon.png1.42KB1.65KB0.00%
admin/img/facebook-carousel-icon.png5.44KB3.18KB▼ 41.64%
admin/img/instagram-facebook-icon.png5.97KB3.34KB▼ 44.02%
admin/img/image-carousel-icon.png5.31KB3.38KB▼ 36.40%