84% woo-add-to-cart-custom-notifications

Code Review | Woo Add To Cart Custom Notifications

WordPress plugin Woo Add To Cart Custom Notifications scored 84% from 54 tests.

About plugin

  • Plugin page: woo-add-to-cart-c...
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-4.6
  • WordPress version: 5.9.2
  • First release: Aug 4, 2016
  • Latest release: Aug 4, 2016
  • Number of updates: 3
  • Update frequency: every 4.0 days
  • Top authors: kungwoo (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 585 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Installer ran successfully

Server metrics [RAM: ▲0.04MB] [CPU: ▼290.93ms] Passed 4 tests

A check of server-side resources used by Woo Add To Cart Custom Notifications
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.63 ▲0.1255.78 ▲4.06
Dashboard /wp-admin3.48 ▲0.0733.21 ▼0.72
Posts /wp-admin/edit.php3.70 ▲0.0637.71 ▲2.51
Add New Post /wp-admin/post-new.php6.94 ▼0.0393.12 ▼1,167.34
Media Library /wp-admin/upload.php3.35 ▲0.0625.17 ▲1.85

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

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 12 new files
Database: no new tables, 1 new option
New WordPress options
woo_add_to_cart_custom_notifications_version

Browser metrics Passed 4 tests

This is an overview of browser requirements for Woo Add To Cart Custom Notifications
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,795 ▲4116.01 ▲0.365.89 ▼0.342.72 ▼0.06
Dashboard /wp-admin2,892 ▲316.14 ▼0.05119.48 ▼28.43157.59 ▼9.47
Posts /wp-admin/edit.php2,685 ▼63.24 ▲0.0161.37 ▼3.45140.13 ▼5.72
Add New Post /wp-admin/post-new.php1,661 ▼016.39 ▲0.66396.47 ▼45.01155.79 ▼0.12
Media Library /wp-admin/upload.php1,698 ▼05.52 ▼0.02146.24 ▲3.64187.44 ▲0.90

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
  • This plugin does not fully uninstall, leaving 1 option in the database
    • woo_add_to_cart_custom_notifications_version

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Almost there! Just fix the following items
  • 4× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/woo-add-to-cart-custom-notifications/woo-add-to-cart-custom-notifications.php
    • > /wp-content/plugins/woo-add-to-cart-custom-notifications/includes/class-woo-add-to-cart-custom-notifications-woo-settings.php
    • > /wp-content/plugins/woo-add-to-cart-custom-notifications/includes/class-woo-add-to-cart-custom-notifications.php
    • > /wp-content/plugins/woo-add-to-cart-custom-notifications/includes/admin/class-woo-add-to-cart-custom-notifications-admin.php

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 Passed 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
5 plugin tags: add-to-cart, woocommerce, notify, shopping cart, notifications

woo-add-to-cart-custom-notifications/woo-add-to-cart-custom-notifications.php Passed 13 tests

The primary PHP file in "Woo Add To Cart Custom Notifications" version 1.0.0 is used by WordPress to initiate all plugin functionality
37 characters long description:
Set custom add-to-cart notifications.

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
There were no executable files found in this plugin259 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP6123389259

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.29
Average class complexity7.00
▷ Minimum class complexity2.00
▷ Maximum class complexity15.00
Average method complexity1.86
▷ Minimum method complexity1.00
▷ Maximum method complexity5.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods21
▷ Static methods838.10%
▷ Public methods1571.43%
▷ Protected methods00.00%
▷ Private methods628.57%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
PNG images were not found in this plugin