93% email-tracking-notification-for-woocommerce

Code Review | Tracking: Emails and Notifications for WooCommerce

WordPress plugin Tracking: Emails and Notifications for WooCommerce scored 93% from 54 tests.

About plugin

  • Plugin page: email-tracking-no...
  • Plugin version: 1.7.4
  • PHP compatiblity: 5.6.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.2.3-5.5
  • WordPress version: 5.9.2
  • First release: Jul 12, 2018
  • Latest release: Aug 13, 2020
  • Number of updates: 17
  • Update frequency: every 44.9 days
  • Top authors: RapidDev (100%)

Code review

54 tests

User reviews

1 review

Install metrics

200+ active / 4,446 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.11MB] [CPU: ▼290.67ms] Passed 4 tests

A check of server-side resources used by Tracking: Emails and Notifications for WooCommerce
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.71 ▲0.2056.77 ▲4.36
Dashboard /wp-admin3.54 ▲0.1335.31 ▲2.03
Posts /wp-admin/edit.php3.77 ▲0.1339.55 ▲2.27
Add New Post /wp-admin/post-new.php7.01 ▲0.0494.57 ▼1,171.33
Media Library /wp-admin/upload.php3.42 ▲0.1327.02 ▲4.38

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 11 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

An overview of browser requirements for Tracking: Emails and Notifications for WooCommerce
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,800 ▲4515.58 ▼0.046.41 ▲0.242.42 ▼0.07
Dashboard /wp-admin2,893 ▲326.13 ▼0.06117.26 ▼23.60154.46 ▼15.65
Posts /wp-admin/edit.php2,711 ▲173.23 ▼0.0063.77 ▲0.51139.11 ▲0.71
Add New Post /wp-admin/post-new.php1,765 ▲10421.09 ▲5.35466.75 ▲32.38157.03 ▼3.18
Media Library /wp-admin/upload.php1,714 ▲165.60 ▲0.17144.76 ▲3.95189.24 ▲1.63

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
This plugin's uninstaller ran successfully

Smoke tests 75% from 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)
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Almost there! Just fix the following items
  • 3× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/email-tracking-notification-for-woocommerce/assets/class.php
    • > /wp-content/plugins/email-tracking-notification-for-woocommerce/emails/tracking_email.php
    • > /wp-content/plugins/email-tracking-notification-for-woocommerce/tracking_email.php

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 87% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
These attributes need to be fixed:
  • Tags: Please reduce the number of tags, currently 14 tag instead of maximum 10
  • Screenshots: These screenshots require images: #4 (Email), #6 (Tracking on the customer's order page)
The official readme.txt is a good inspiration

email-tracking-notification-for-woocommerce/tracking_email.php 85% from 13 tests

The main PHP script in "Tracking: Emails and Notifications for WooCommerce" version 1.7.4 is automatically included on every request by WordPress
The following require your attention:
  • Text Domain: Please use dashes and lowercase characters for text domains
  • Main file name: Name the main plugin file the same as the plugin slug ("email-tracking-notification-for-woocommerce.php" instead of "tracking_email.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Good job! No executable or dangerous file extensions detected935 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code
PHP5106299656
JavaScript11512132
PO File155124109
Markdown112038

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.44
Average class complexity34.67
▷ Minimum class complexity4.00
▷ Maximum class complexity91.00
Average method complexity4.32
▷ Minimum method complexity1.00
▷ Maximum method complexity14.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods25
▷ Static methods14.00%
▷ Public methods1560.00%
▷ Protected methods14.00%
▷ Private methods936.00%
Functions7
▷ Named functions00.00%
▷ Anonymous functions7100.00%
Constants7
▷ Global constants7100.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 files were detected