10% woo-product-carousel-2

Code Review | Product carousel for visual composer

WordPress plugin Product carousel for visual composer scored10%from 54 tests.

About plugin

  • Plugin page: woo-product-carou...
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.8.0
  • WordPress version: 6.3.1
  • First release: Jul 18, 2017
  • Latest release: Jul 18, 2017
  • Number of updates: 18
  • Update frequency: N/A
  • Top authors: designas (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,706 total downloads

Benchmarks

Plugin footprint 58% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
You still need to fix the following installer errors
  • The plugin cannot be installed
    • > Warning in wp-content/plugins/woo-product-carousel-2/includes/class-wc_product_carousel.php+103
    require_once(wp-content/plugins/woo-product-carousel-2/includes/class-wc_product_carousel-loader.php): failed to open stream: No such file or directory

Server metrics [RAM: ▼0.01MB] [CPU: ▼7.79ms] Passed 4 tests

A check of server-side resources used by Product carousel for visual composer
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0042.17 ▼6.37
Dashboard /wp-admin3.31 ▼0.0449.31 ▼14.36
Posts /wp-admin/edit.php3.36 ▲0.0046.91 ▲0.86
Add New Post /wp-admin/post-new.php5.89 ▲0.0086.74 ▼10.46
Media Library /wp-admin/upload.php3.23 ▲0.0035.40 ▲0.02

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

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 30 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
can_compress_scripts
widget_theysaidso_widget
widget_recent-comments
widget_recent-posts
theysaidso_admin_options

Browser metrics Passed 4 tests

This is an overview of browser requirements for Product carousel for visual composer
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.17 ▼0.201.77 ▼0.0843.97 ▼0.78
Dashboard /wp-admin2,198 ▲215.63 ▲0.0288.42 ▼1.7438.71 ▼1.84
Posts /wp-admin/edit.php2,097 ▼32.01 ▼0.0136.56 ▼2.1433.49 ▼2.18
Add New Post /wp-admin/post-new.php1,526 ▼922.93 ▲4.42648.19 ▼18.5256.07 ▼14.68
Media Library /wp-admin/upload.php1,400 ▼04.14 ▼0.05104.55 ▲8.8244.30 ▼3.68

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
Please fix the following items
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • db_upgraded
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-posts
    • can_compress_scripts
    • widget_recent-comments

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
Good news, no errors were detected

SRP 0% 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 fix the following
  • 2× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/woo-product-carousel-2/public/partials/wc_product_carousel-public-display.php
    • > /wp-content/plugins/woo-product-carousel-2/admin/partials/wc_product_carousel-admin-display.php
  • 3× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function vc_map() in wp-content/plugins/woo-product-carousel-2/includes/shortcode/category_carousel.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function vc_map() in wp-content/plugins/woo-product-carousel-2/includes/shortcode/featured_product.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/woo-product-carousel-2/admin/class-wc_product_carousel-admin.php:106

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 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
Attributes that need to be fixed: You can take inspiration from this readme.txt

woo-product-carousel-2/wc_product_carousel.php 85% from 13 tests

The principal PHP file in "Product carousel for visual composer" v. 1.0.0 is loaded by WordPress automatically on each request
The following require your attention:
  • Text Domain: The text domain name should consist of only dashes and lowercase characters
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("woo-product-carousel-2.php" instead of "wc_product_carousel.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Success! There were no dangerous files found in this plugin613 lines of code in 17 files:
LanguageFilesBlank linesComment linesLines of code
PHP14141640558
CSS321355

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.24
Average class complexity6.43
▷ Minimum class complexity1.00
▷ Maximum class complexity39.00
Average method complexity2.03
▷ Minimum method complexity1.00
▷ Maximum method complexity12.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods37
▷ Static methods25.41%
▷ Public methods2670.27%
▷ Protected methods25.41%
▷ Private methods924.32%
Functions8
▷ Named functions8100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
There were not PNG files found in your plugin