68% wp-tools-divi-product-carousel

Code Review | WP Tools Divi Product Carousel

WordPress plugin WP Tools Divi Product Carousel scored68%from 54 tests.

About plugin

  • Plugin page: wp-tools-divi-pro...
  • Plugin version: 1.5.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.9.8-6.3
  • WordPress version: 6.3.1
  • First release: Aug 7, 2019
  • Latest release: Aug 24, 2023
  • Number of updates: 12
  • Update frequency: every 123.4 days
  • Top authors: wpt00ls (100%)

Code review

54 tests

User reviews

5 reviews

Install metrics

400+ active /5,790 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.04MB] [CPU: ▲20.27ms] 75% from 4 tests

A check of server-side resources used by WP Tools Divi Product Carousel
It is recommended to improve the following
  • Extra RAM: The extra memory usage should kept under 5MB (currently 5.04MB on /wp-admin/admin.php?page=wp-tools-divi-product-carousel)
PageMemory (MB)CPU Time (ms)
Home /8.93 ▲5.4771.56 ▲30.21
Dashboard /wp-admin8.95 ▲5.6477.90 ▲16.48
Posts /wp-admin/edit.php8.95 ▲5.5964.56 ▲19.65
Add New Post /wp-admin/post-new.php9.34 ▲3.46119.79 ▲14.72
Media Library /wp-admin/upload.php8.95 ▲5.7266.02 ▲33.30
Freemius Debug [v.2.5.10] /wp-admin/admin.php?page=freemius8.9558.24
Divi Product Carousel /wp-admin/admin.php?page=wp-tools-divi-product-carousel8.9561.20

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

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 250 new files
Database: no new tables, 9 new options
New WordPress options
fs_accounts
widget_recent-posts
widget_theysaidso_widget
can_compress_scripts
widget_recent-comments
fs_active_plugins
db_upgraded
fs_debug_mode
theysaidso_admin_options

Browser metrics Passed 4 tests

An overview of browser requirements for WP Tools Divi Product Carousel
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,818 ▲8314.48 ▲0.101.79 ▲0.0732.11 ▼9.43
Dashboard /wp-admin2,224 ▲395.82 ▲0.0197.73 ▼4.0440.64 ▼5.81
Posts /wp-admin/edit.php2,107 ▲182.04 ▲0.0535.19 ▼2.8835.48 ▲1.83
Add New Post /wp-admin/post-new.php1,519 ▼1423.06 ▲0.19613.70 ▲33.6662.37 ▲3.75
Media Library /wp-admin/upload.php1,409 ▲184.22 ▲0.08108.94 ▲9.6050.41 ▲7.97
Freemius Debug [v.2.5.10] /wp-admin/admin.php?page=freemius1,0811.6823.7525.96
Divi Product Carousel /wp-admin/admin.php?page=wp-tools-divi-product-carousel9541.7131.2757.90

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
  • Uninstall procedure had uncaught errors
    • > Notice in wp-content/plugins/wp-tools-divi-product-carousel/freemius/includes/class-freemius.php+8486
    Undefined property: stdClass::$plugins
  • This plugin does not fully uninstall, leaving 9 options in the database
    • db_upgraded
    • can_compress_scripts
    • fs_debug_mode
    • widget_theysaidso_widget
    • fs_active_plugins
    • theysaidso_admin_options
    • fs_accounts
    • widget_recent-comments
    • widget_recent-posts

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking 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
  • 1× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/wp-tools-divi-product-carousel/resources/views/wptools-divi-carousel-blog-item.php
  • 21× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'Pimple\\Container' not found in wp-content/plugins/wp-tools-divi-product-carousel/src/Loader.php:9
    • > PHP Fatal error
      Uncaught Error: Class 'DiviExtension' not found in wp-content/plugins/wp-tools-divi-product-carousel/includes/modules/DiviProductCarouselExtension.php:6
    • > PHP Notice
      Undefined variable: featured_image in wp-content/plugins/wp-tools-divi-product-carousel/resources/views/wptools-divi-carousel-blog-item.php on line 8
    • > PHP Notice
      Undefined variable: blog in wp-content/plugins/wp-tools-divi-product-carousel/resources/views/wptools-divi-carousel-blog-item.php on line 13
    • > PHP Fatal error
      Uncaught Error: Interface 'Psr\\Container\otFoundExceptionInterface' not found in wp-content/plugins/wp-tools-divi-product-carousel/vendor/pimple/pimple/src/Pimple/Exception/InvalidServiceIdentifierException.php:36
    • > PHP Fatal error
      Uncaught Error: Interface 'Psr\\Container\\ContainerExceptionInterface' not found in wp-content/plugins/wp-tools-divi-product-carousel/vendor/pimple/pimple/src/Pimple/Exception/ExpectedInvokableException.php:36
    • > PHP Fatal error
      Uncaught Error: Class 'ET_Builder_Module' not found in wp-content/plugins/wp-tools-divi-product-carousel/includes/modules/DiviCarouselProductItemModule/DiviCarouselProductItemModule.php:10
    • > PHP Notice
      Undefined variable: props in wp-content/plugins/wp-tools-divi-product-carousel/resources/views/wptools-divi-carousel-blog-item.php on line 2
    • > PHP Notice
      Undefined variable: props in wp-content/plugins/wp-tools-divi-product-carousel/resources/views/wptools-divi-carousel-blog-item.php on line 16
    • > PHP Notice
      Trying to get property 'post_title' of non-object in wp-content/plugins/wp-tools-divi-product-carousel/resources/views/wptools-divi-carousel-blog-item.php on line 13

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser errors were detected

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
6 plugin tags: product carousel, woocommerce carousel divi, woocommerce divi carousel, divi, divi product module...

wp-tools-divi-product-carousel/wp-tools-divi-product-carousel.php 92% from 13 tests

"WP Tools Divi Product Carousel" version 1.5.1's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
The following require your attention:
  • Domain Path: The domain path is invalid: folder "/languages" does not exist

Code Analysis 97% from 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 plugin37,879 lines of code in 190 files:
LanguageFilesBlank linesComment linesLines of code
PHP1528,29318,19334,437
JavaScript108911232,367
CSS16475306
Sass2275262
JSON300174
LESS1115152
reStructuredText19613997
YAML17139
XML12016
SVG11013
Markdown1508
Ruby1208

PHP code 50% from 2 tests

This plugin's cyclomatic complexity and code structure detailed below
It is recommended to fix the following
  • Cyclomatic complexity of classes has to be reduced to less than 1000 (currently 3,073)
Cyclomatic complexity
Average complexity per logical line of code0.62
Average class complexity64.38
▷ Minimum class complexity1.00
▷ Maximum class complexity3,073.00
Average method complexity4.41
▷ Minimum method complexity1.00
▷ Maximum method complexity94.00
Code structure
Namespaces12
Interfaces4
Traits0
Classes68
▷ Abstract classes22.94%
▷ Concrete classes6697.06%
▷ Final classes23.03%
Methods1,370
▷ Static methods21615.77%
▷ Public methods97871.39%
▷ Protected methods181.31%
▷ Private methods37427.30%
Functions109
▷ Named functions10091.74%
▷ Anonymous functions98.26%
Constants145
▷ Global constants9867.59%
▷ Class constants4732.41%
▷ Public constants47100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
3 PNG files occupy 0.03MB with 0.01MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
freemius/assets/img/plugin-icon.png9.16KB5.26KB▼ 42.58%
freemius/assets/img/theme-icon.png10.97KB5.78KB▼ 47.37%
freemius/assets/img/wp-tools-divi-product-carousel.png10.93KB4.63KB▼ 57.58%