83% woo-add-to-cart-notifications

Code Review | Add To Cart Notifications

WordPress plugin Add To Cart Notifications scored83%from 54 tests.

About plugin

  • Plugin page: woo-add-to-cart-n...
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7.0-4.9.4
  • WordPress version: 6.3.1
  • First release: Apr 19, 2018
  • Latest release: May 3, 2018
  • Number of updates: 11
  • Update frequency: every 3.3 days
  • Top authors: penguinarts (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /514 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
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.05MB] [CPU: ▼5.37ms] Passed 4 tests

Analyzing server-side resources used by Add To Cart Notifications
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0643.34 ▲0.34
Dashboard /wp-admin3.36 ▲0.0650.69 ▼3.91
Posts /wp-admin/edit.php3.41 ▲0.0550.76 ▼3.41
Add New Post /wp-admin/post-new.php5.94 ▲0.0591.61 ▼14.49
Media Library /wp-admin/upload.php3.28 ▲0.0541.44 ▲5.86

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for Add To Cart Notifications
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,973 ▲21213.57 ▼0.7211.32 ▲9.3937.55 ▼11.31
Dashboard /wp-admin2,239 ▲364.84 ▼0.03100.36 ▼11.0835.97 ▼6.55
Posts /wp-admin/edit.php2,097 ▼02.02 ▼0.0134.13 ▼5.7836.53 ▼3.65
Add New Post /wp-admin/post-new.php1,570 ▲2518.14 ▼5.01610.41 ▼15.3167.07 ▲11.62
Media Library /wp-admin/upload.php1,421 ▲214.19 ▼0.03103.10 ▼9.2546.72 ▼0.97

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-comments
    • widget_recent-posts
    • can_compress_scripts
    • db_upgraded

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
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/woo-add-to-cart-notifications/woocommerce-add-to-cart-notifications.php:67

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side

Optimizations

Plugin configuration 86% from 29 tests

readme.txt 81% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
These attributes need to be fixed:
  • Contributors: Plugin contributors not specified
  • Donate link: Please fix this invalid url: "paypal.me/penguinarts"
  • Screenshots: Please add descriptions for these screenshots #2, #3, #4 in woo-add-to-cart-notifications/assets to your readme.txt
You can take inspiration from this readme.txt

woo-add-to-cart-notifications/woocommerce-add-to-cart-notifications.php 92% from 13 tests

The principal PHP file in "Add To Cart Notifications" v. 1.0.0 is loaded by WordPress automatically on each request
You should first fix the following items:
  • Main file name: Name the main plugin file the same as the plugin slug ("woo-add-to-cart-notifications.php" instead of "woocommerce-add-to-cart-notifications.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
Good job! No executable or dangerous file extensions detected3,676 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code
SVG1002,671
CSS43713617
PHP131037227
JavaScript285161

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.15
Average class complexity21.00
▷ Minimum class complexity21.00
▷ Maximum class complexity21.00
Average method complexity2.82
▷ Minimum method complexity1.00
▷ Maximum method complexity10.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods11
▷ Static methods00.00%
▷ Public methods11100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants00.00%
▷ Class constants1100.00%
▷ Public constants1100.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