83% carousel-upsells-and-related-product-for-woocommerce

Code Review | Carousel Upsells and Related Product for Woocommerce

WordPress plugin Carousel Upsells and Related Product for Woocommerce scored83%from 54 tests.

About plugin

  • Plugin page: carousel-upsells-...
  • Plugin version: 0.4.6
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.3.0-5.8
  • WordPress version: 6.3.1
  • First release: Sep 27, 2019
  • Latest release: Nov 10, 2021
  • Number of updates: 64
  • Update frequency: every 12.1 days
  • Top authors: alexodiy (100%)

Code review

54 tests

User reviews

64 reviews

Install metrics

2,000+ active /27,465 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▼0.10MB] [CPU: ▼15.52ms] Passed 4 tests

Server-side resources used by Carousel Upsells and Related Product for Woocommerce
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0140.18 ▼9.54
Dashboard /wp-admin3.33 ▲0.0247.28 ▼11.20
Posts /wp-admin/edit.php3.38 ▼0.4752.74 ▼18.78
Add New Post /wp-admin/post-new.php5.93 ▲0.0483.56 ▼22.57
Media Library /wp-admin/upload.php3.25 ▲0.0242.91 ▲9.81

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 57 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-posts
can_compress_scripts
db_upgraded

Browser metrics Passed 4 tests

This is an overview of browser requirements for Carousel Upsells and Related Product for Woocommerce
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5413.23 ▼1.361.49 ▼0.9139.39 ▼7.62
Dashboard /wp-admin2,206 ▲154.87 ▲0.02112.00 ▼28.4645.58 ▼24.23
Posts /wp-admin/edit.php2,092 ▼02.04 ▼0.0338.79 ▼5.6433.30 ▼5.02
Add New Post /wp-admin/post-new.php1,542 ▲1418.57 ▲0.29601.53 ▼64.5154.44 ▲0.65
Media Library /wp-admin/upload.php1,385 ▼34.26 ▲0.07104.89 ▼8.3245.80 ▼2.13

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
Please fix the following items
  • Zombie WordPress options were found after uninstall: 6 options
    • db_upgraded
    • can_compress_scripts
    • widget_recent-posts
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
The smoke test was a success, however most plugin functionality was not tested

SRP 50% 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 items
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/carousel-upsells-and-related-product-for-woocommerce/includes/ffxf_related_and_upsells_rate.php:6

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

Optimizations

Plugin configuration 86% from 29 tests

readme.txt 94% from 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
Attributes that need to be fixed:
  • Tags: Please reduce the number of tags, currently 12 tag instead of maximum 10
The official readme.txt is a good inspiration

carousel-upsells-and-related-product-for-woocommerce/ffxf-woo-glide-related-and-upsells.php 77% from 13 tests

Analyzing the main PHP file in "Carousel Upsells and Related Product for Woocommerce" version 0.4.6
It is important to fix the following:
  • Requires at least: Required version must be the same as the one declared in readme.txt ("4.8" instead of "3.3.0")
  • Description: Please keep the plugin description shorter than 140 characters (currently 197 characters long)
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("carousel-upsells-and-related-product-for-woocommerce.php" instead of "ffxf-woo-glide-related-and-upsells.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
There were no executable files found in this plugin2,212 lines of code in 48 files:
LanguageFilesBlank linesComment linesLines of code
PHP74081831,544
JavaScript411720280
CSS5317216
SVG3200172

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.17
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions28
▷ Named functions28100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
4 PNG files occupy 1.00MB with 0.64MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/img/center_mod.png253.90KB104.22KB▼ 58.95%
assets/img/iPhone_6.png507.29KB138.17KB▼ 72.76%
assets/img/sc_1.png202.06KB69.62KB▼ 65.54%
assets/img/sc_2.png59.57KB24.92KB▼ 58.16%