89% woo-added-to-cart-notification

Code Review | WPC Added To Cart Notification for WooCommerce

WordPress plugin WPC Added To Cart Notification for WooCommerce scored89%from 54 tests.

About plugin

  • Plugin page: woo-added-to-cart...
  • Plugin version: 2.4.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-6.4
  • WordPress version: 6.3.1
  • First release: Feb 9, 2018
  • Latest release: Nov 14, 2023
  • Number of updates: 96
  • Update frequency: every 21.9 days
  • Top authors: wpclever (100%)

Code review

54 tests

User reviews

9 reviews

Install metrics

4,000+ active /117,276 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
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.27MB] [CPU: ▼4.85ms] Passed 4 tests

An overview of server-side resources used by WPC Added To Cart Notification for WooCommerce
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.74 ▲0.2738.54 ▼5.09
Dashboard /wp-admin3.58 ▲0.2749.20 ▼5.00
Posts /wp-admin/edit.php3.69 ▲0.3352.25 ▲7.20
Add New Post /wp-admin/post-new.php6.18 ▲0.2992.73 ▼8.10
Media Library /wp-admin/upload.php3.50 ▲0.2735.61 ▼1.20
About /wp-admin/admin.php?page=wpclever3.4731.56
Essential Kit /wp-admin/admin.php?page=wpclever-kit3.4731.53

Server storage [IO: ▲0.80MB] [DB: ▲0.02MB] Passed 3 tests

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 41 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
can_compress_scripts
theysaidso_admin_options
db_upgraded
widget_recent-posts
widget_recent-comments

Browser metrics Passed 4 tests

An overview of browser requirements for WPC Added To Cart Notification for WooCommerce
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,892 ▲13014.67 ▲0.441.97 ▲0.2440.08 ▼1.66
Dashboard /wp-admin2,260 ▲835.52 ▼0.1588.16 ▲1.1873.01 ▲33.66
Posts /wp-admin/edit.php2,178 ▲781.97 ▲0.0237.89 ▼0.1534.58 ▼1.57
Add New Post /wp-admin/post-new.php1,753 ▲22722.44 ▼1.09645.39 ▲27.5253.55 ▼3.56
Media Library /wp-admin/upload.php1,468 ▲654.19 ▼0.0695.38 ▼0.3376.24 ▲34.84
About /wp-admin/admin.php?page=wpclever1,4082.2734.0937.69
Essential Kit /wp-admin/admin.php?page=wpclever-kit5,7352.1635.0559.43

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_theysaidso_widget
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_recent-posts
    • db_upgraded

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Everything seems fine, however this is by no means an exhaustive test

SRP Passed 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
Congratulations! This plugin passed the SRP test

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
These attributes need to be fixed: Please take inspiration from this readme.txt

woo-added-to-cart-notification/wpc-added-to-cart-notification.php 92% from 13 tests

The primary PHP file in "WPC Added To Cart Notification for WooCommerce" version 2.4.1 is used by WordPress to initiate all plugin functionality
You should first fix the following items:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("woo-added-to-cart-notification.php" instead of "wpc-added-to-cart-notification.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Success! There were no dangerous files found in this plugin5,835 lines of code in 29 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript93751771,855
CSS8327711,631
PHP5149481,145
SVG300809
PO File4140180395

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.32
Average class complexity32.00
▷ Minimum class complexity1.00
▷ Maximum class complexity80.00
Average method complexity4.54
▷ Minimum method complexity1.00
▷ Maximum method complexity30.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods35
▷ Static methods411.43%
▷ Public methods35100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions3
▷ Named functions266.67%
▷ Anonymous functions133.33%
Constants10
▷ Global constants10100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
There were not PNG files found in your plugin