73% post-carousel-divi

Code Review | Post Carousel Divi

WordPress plugin Post Carousel Divi scored 73% from 54 tests.

About plugin

  • Plugin page: post-carousel-divi
  • Plugin version: 1.2
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.3
  • WordPress version: 6.3.1
  • First release: Mar 29, 2021
  • Latest release: Aug 28, 2023
  • Number of updates: 24
  • Update frequency: every 37.0 days
  • Top authors: themeythemes (100%)

Code review

54 tests

User reviews

6 reviews

Install metrics

2,000+ active / 9,295 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: ▲0.54MB] [CPU: ▲0.38ms] Passed 4 tests

An overview of server-side resources used by Post Carousel Divi
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /4.05 ▲0.5941.11 ▲0.67
Dashboard /wp-admin3.90 ▲0.6052.31 ▲5.52
Posts /wp-admin/edit.php3.95 ▲0.6051.86 ▲7.27
Add New Post /wp-admin/post-new.php6.42 ▲0.5389.35 ▼6.29
Media Library /wp-admin/upload.php3.66 ▲0.4339.24 ▲1.60
Support Forum /wp-admin/admin.php?page=lwp_post_carousel-wp-support-forum3.5330.45
Freemius Debug [v.2.5.10] /wp-admin/admin.php?page=freemius3.9944.67
Upgrade  ➤ /wp-admin/admin.php?page=lwp_post_carousel-pricing3.7032.83
Contact Us /wp-admin/admin.php?page=lwp_post_carousel-contact3.6941.23

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

How much does this plugin use your filesystem and database?
This plugin was installed successfully
Filesystem: 193 new files
Database: no new tables, 10 new options
New WordPress options
fs_accounts
lwp_post_carousel_activation_time
widget_recent-posts
widget_theysaidso_widget
fs_debug_mode
can_compress_scripts
db_upgraded
widget_recent-comments
theysaidso_admin_options
fs_active_plugins

Browser metrics Passed 4 tests

Post Carousel Divi: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,846 ▲11113.26 ▼1.061.76 ▼0.0240.93 ▼4.75
Dashboard /wp-admin2,230 ▲424.86 ▲0.00108.05 ▲2.7341.66 ▼2.10
Posts /wp-admin/edit.php2,113 ▲242.00 ▼0.0139.14 ▲4.6734.17 ▼3.06
Add New Post /wp-admin/post-new.php1,541 ▲818.33 ▼4.85594.14 ▼78.0961.94 ▲4.12
Media Library /wp-admin/upload.php1,412 ▲244.24 ▲0.0298.29 ▼17.0843.37 ▼4.27
Support Forum /wp-admin/admin.php?page=lwp_post_carousel-wp-support-forum2,1663.9885.3590.68
Freemius Debug [v.2.5.10] /wp-admin/admin.php?page=freemius1,0811.8523.4427.79
Upgrade  ➤ /wp-admin/admin.php?page=lwp_post_carousel-pricing2,1953.3561.57134.50
Contact Us /wp-admin/admin.php?page=lwp_post_carousel-contact1,5663.2054.3060.92

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • This plugin did not uninstall without warnings or errors
    • > Notice in wp-content/plugins/post-carousel-divi/freemius/includes/class-freemius.php+8486
    Undefined property: stdClass::$plugins
  • Zombie WordPress options detected upon uninstall: 10 options
    • widget_recent-posts
    • lwp_post_carousel_activation_time
    • can_compress_scripts
    • db_upgraded
    • widget_recent-comments
    • widget_theysaidso_widget
    • fs_accounts
    • fs_active_plugins
    • fs_debug_mode
    • theysaidso_admin_options

Smoke tests 75% 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 50% 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
Please fix the following items
  • 2× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'ET_Builder_Module' not found in wp-content/plugins/post-carousel-divi/includes/modules/DiviPostCarousel/DiviPostCarousel.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'DiviExtension' not found in wp-content/plugins/post-carousel-divi/includes/PostCarousel.php:3

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)
There were no browser issues found

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
Please fix the following attributes: You can take inspiration from this readme.txt

post-carousel-divi/post-carousel.php 85% from 13 tests

The entry point to "Post Carousel Divi" version 1.2 is a PHP file that has certain tags in its header comment area
Please take the time to fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("post-carousel-divi.php" instead of "post-carousel.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 | A short check of programming languages and file extensions; no executable files are allowed
No dangerous file extensions were detected35,654 lines of code in 146 files:
LanguageFilesBlank linesComment linesLines of code
PHP1248,12817,37035,106
PO File1151226336
JavaScript53459196
CSS160016

PHP code 50% from 2 tests

This is a very shot review of cyclomatic complexity and code structure
It is recommended to fix the following
  • Class cyclomatic complexity should be reduced to less than 1000 (currently 3,073)
Cyclomatic complexity
Average complexity per logical line of code0.63
Average class complexity89.04
▷ Minimum class complexity1.00
▷ Maximum class complexity3,073.00
Average method complexity4.63
▷ Minimum method complexity1.00
▷ Maximum method complexity94.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes51
▷ Abstract classes23.92%
▷ Concrete classes4996.08%
▷ Final classes00.00%
Methods1,267
▷ Static methods19715.55%
▷ Public methods87769.22%
▷ Protected methods171.34%
▷ Private methods37329.44%
Functions108
▷ Named functions108100.00%
▷ Anonymous functions00.00%
Constants145
▷ Global constants9867.59%
▷ Class constants4732.41%
▷ 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
2 PNG files occupy 0.02MB with 0.01MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
freemius/assets/img/theme-icon.png10.97KB5.78KB▼ 47.37%
freemius/assets/img/plugin-icon.png9.16KB5.26KB▼ 42.58%