84% wc-confetti

Code Review | Confetti for WooCommerce

WordPress plugin Confetti for WooCommerce scored84%from 54 tests.

About plugin

  • Plugin page: wc-confetti
  • Plugin version: 1.1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 2.5-6.4
  • WordPress version: 6.3.1
  • First release: Mar 12, 2023
  • Latest release: Nov 13, 2023
  • Number of updates: 7
  • Update frequency: every 35.4 days
  • Top authors: emreguler (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /213 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Install script ran successfully

Server metrics [RAM: ▲0.09MB] [CPU: ▼7.63ms] Passed 4 tests

A check of server-side resources used by Confetti for WooCommerce
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.55 ▲0.0938.43 ▼4.16
Dashboard /wp-admin3.39 ▲0.0946.05 ▼6.17
Posts /wp-admin/edit.php3.50 ▲0.1549.81 ▲5.49
Add New Post /wp-admin/post-new.php5.97 ▲0.0982.39 ▼18.90
Media Library /wp-admin/upload.php3.31 ▲0.0934.09 ▼1.28

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

Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 23 new files
Database: no new tables, 17 new options
New WordPress options
theysaidso_admin_options
wcc_size
wcc_font
widget_theysaidso_widget
db_upgraded
widget_recent-comments
wcc_text
can_compress_scripts
wcc_duration
widget_recent-posts
...

Browser metrics Passed 4 tests

An overview of browser requirements for Confetti for WooCommerce
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,793 ▲3114.72 ▲0.361.67 ▲0.0337.53 ▼6.87
Dashboard /wp-admin2,198 ▲185.60 ▼0.0394.27 ▼9.1939.66 ▼7.89
Posts /wp-admin/edit.php2,103 ▲61.94 ▼0.0640.73 ▲2.6237.38 ▲4.68
Add New Post /wp-admin/post-new.php1,531 ▼023.32 ▲0.30658.96 ▼9.6369.31 ▲16.39
Media Library /wp-admin/upload.php1,400 ▲64.19 ▲0.02103.93 ▼2.5243.51 ▲0.82

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
You still need to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-comments
    • widget_theysaidso_widget
    • can_compress_scripts
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
The following issues need your attention
  • 2× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/wc-confetti/admin/partials/wc-confetti-admin-display.php
    • > /wp-content/plugins/wc-confetti/public/partials/wc-confetti-public-display.php

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
3 plugin tags: woocommerce, confetti, cart

wc-confetti/wc-confetti.php 92% from 13 tests

The main PHP file in "Confetti for WooCommerce" ver. 1.1.0 adds more information about the plugin and also serves as the entry point for this plugin
Please take the time to fix the following:
  • Requires at least: Required version must match the one declared in readme.txt ("3.0.1" instead of "2.5")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
There were no executable files found in this plugin391 lines of code in 17 files:
LanguageFilesBlank linesComment linesLines of code
PHP12118540325
JavaScript345466
CSS2080

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.08
Average class complexity2.29
▷ Minimum class complexity1.00
▷ Maximum class complexity6.00
Average method complexity1.31
▷ Minimum method complexity1.00
▷ Maximum method complexity6.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods27
▷ Static methods27.41%
▷ Public methods2281.48%
▷ Protected methods00.00%
▷ Private methods518.52%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
No PNG images were found in this plugin