67% order-tracking

Code Review | Order Tracking - WordPress Status Tracking Plugin

WordPress plugin Order Tracking - WordPress Status Tracking Plugin scored67%from 54 tests.

About plugin

  • Plugin page: order-tracking
  • Plugin version: 3.3.8
  • PHP version: 7.4.16
  • WordPress compatibility: 7.1-6.4
  • WordPress version: 6.3.1
  • First release: Apr 3, 2014
  • Latest release: Nov 7, 2023
  • Number of updates: 570
  • Update frequency: every 6.2 days
  • Top authors: Rustaurius (100%)

Code review

54 tests

User reviews

68 reviews

Install metrics

5,000+ active /350,931 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Installer ran successfully

Server metrics [RAM: ▲2.27MB] [CPU: ▲6.49ms] Passed 4 tests

This is a short check of server-side resources used by Order Tracking - WordPress Status Tracking Plugin
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /5.69 ▲2.2357.74 ▲14.87
Dashboard /wp-admin5.61 ▲2.3158.67 ▼0.19
Posts /wp-admin/edit.php5.65 ▲2.2967.34 ▲22.52
Add New Post /wp-admin/post-new.php8.26 ▲2.3888.29 ▼11.26
Media Library /wp-admin/upload.php5.49 ▲2.2656.15 ▲22.55
Customers /wp-admin/admin.php?page=ewd-otp-customers5.5449.59
Add New /wp-admin/admin.php?page=ewd-otp-add-edit-customer5.4846.65
Add New /wp-admin/admin.php?page=ewd-otp-add-edit-order5.5346.82
About Us /wp-admin/admin.php?page=ewd-otp-about-us5.4246.54
Orders /wp-admin/admin.php?page=ewd-otp-orders5.6946.75
Sales Reps /wp-admin/admin.php?page=ewd-otp-sales-reps5.5456.49
Settings /wp-admin/admin.php?page=ewd-otp-settings5.5151.82
Import /wp-admin/admin.php?page=ewd-otp-import5.4161.37
Export /wp-admin/admin.php?page=ewd-otp-export5.5049.20
Add New /wp-admin/admin.php?page=ewd-otp-add-edit-sales-rep5.4750.14

Server storage [IO: ▲10.07MB] [DB: ▲0.01MB] Passed 3 tests

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 900 new files
Database: 5 new tables, 9 new options
New tables
wp_EWD_OTP_Customers
wp_EWD_OTP_Fields_Meta
wp_EWD_OTP_Orders
wp_EWD_OTP_Order_Statuses
wp_EWD_OTP_Sales_Reps
New WordPress options
db_upgraded
widget_recent-posts
can_compress_scripts
ewd-otp-permission-level
theysaidso_admin_options
widget_recent-comments
widget_theysaidso_widget
ewd-otp-settings
ewd-otp-installation-time

Browser metrics Passed 4 tests

An overview of browser requirements for Order Tracking - WordPress Status Tracking Plugin
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,853 ▲6614.27 ▲0.041.73 ▼0.2042.59 ▼0.62
Dashboard /wp-admin2,258 ▲845.65 ▲0.1288.45 ▼2.9042.08 ▲0.52
Posts /wp-admin/edit.php2,160 ▲601.98 ▲0.0439.19 ▼2.8534.35 ▼0.32
Add New Post /wp-admin/post-new.php1,711 ▲18523.48 ▲0.40743.08 ▲100.2837.97 ▼10.48
Media Library /wp-admin/upload.php1,457 ▲574.20 ▼0.0597.66 ▼10.1541.54 ▼4.65
Customers /wp-admin/admin.php?page=ewd-otp-customers9162.2331.9945.27
Add New /wp-admin/admin.php?page=ewd-otp-add-edit-customer1,1082.2328.8241.64
Add New /wp-admin/admin.php?page=ewd-otp-add-edit-order1,3012.5128.1039.69
About Us /wp-admin/admin.php?page=ewd-otp-about-us1,3362.2329.2532.43
Orders /wp-admin/admin.php?page=ewd-otp-orders1,4092.0434.5639.49
Sales Reps /wp-admin/admin.php?page=ewd-otp-sales-reps8982.2131.0734.94
Settings /wp-admin/admin.php?page=ewd-otp-settings2,0019.90292.3043.31
Import /wp-admin/admin.php?page=ewd-otp-import9102.2231.0236.10
Export /wp-admin/admin.php?page=ewd-otp-export1,0943.3948.5232.78
Add New /wp-admin/admin.php?page=ewd-otp-add-edit-sales-rep1,1032.2428.9137.91

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • Zombie tables detected upon uninstall: 5 tables
    • wp_EWD_OTP_Orders
    • wp_EWD_OTP_Customers
    • wp_EWD_OTP_Fields_Meta
    • wp_EWD_OTP_Order_Statuses
    • wp_EWD_OTP_Sales_Reps
  • This plugin does not fully uninstall, leaving 9 options in the database
    • db_upgraded
    • widget_recent-comments
    • widget_recent-posts
    • widget_theysaidso_widget
    • ewd-otp-installation-time
    • ewd-otp-settings
    • can_compress_scripts
    • theysaidso_admin_options
    • ewd-otp-permission-level

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Good news, no errors were detected

SRP 0% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please fix the following items
  • 1× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/order-tracking/ewd-otp-templates/customer-order-recaptcha.php
  • 346× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'PhpOffice\\PhpSpreadsheet\\Writer\\Xlsx\\WriterPart' not found in wp-content/plugins/order-tracking/lib/PHPSpreadsheet/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Writer/Xlsx/DocProps.php:11
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/order-tracking/ewd-otp-templates/form-submit.php:5
    • > PHP Fatal error
      Trait 'PhpOffice\\PhpSpreadsheet\\Calculation\\ArrayEnabled' not found in wp-content/plugins/order-tracking/lib/PHPSpreadsheet/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/MathTrig/Roman.php on line 9
    • > PHP Fatal error
      Uncaught Error: Class 'PhpOffice\\PhpSpreadsheet\\Chart\\Properties' not found in wp-content/plugins/order-tracking/lib/PHPSpreadsheet/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Chart/Axis.php:11
    • > PHP Fatal error
      Trait 'PhpOffice\\PhpSpreadsheet\\Calculation\\ArrayEnabled' not found in wp-content/plugins/order-tracking/lib/PHPSpreadsheet/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/MathTrig/Trig/Sine.php on line 9
    • > PHP Fatal error
      Uncaught Error: Class 'PhpOffice\\PhpSpreadsheet\\Exception' not found in wp-content/plugins/order-tracking/lib/PHPSpreadsheet/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Chart/Exception.php:7
    • > PHP Fatal error
      Trait 'PhpOffice\\PhpSpreadsheet\\Calculation\\ArrayEnabled' not found in wp-content/plugins/order-tracking/lib/PHPSpreadsheet/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/DateTimeExcel/NetworkDays.php on line 9
    • > PHP Fatal error
      Uncaught Error: Class 'PhpOffice\\PhpSpreadsheet\\Style\umberFormat\\Wizard\umberBase' not found in wp-content/plugins/order-tracking/lib/PHPSpreadsheet/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Style/NumberFormat/Wizard/Scientific.php:7
    • > PHP Fatal error
      Trait 'PhpOffice\\PhpSpreadsheet\\Calculation\\ArrayEnabled' not found in wp-content/plugins/order-tracking/lib/PHPSpreadsheet/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/DateTimeExcel/Month.php on line 8
    • > PHP Fatal error
      Trait 'PhpOffice\\PhpSpreadsheet\\Calculation\\ArrayEnabled' not found in wp-content/plugins/order-tracking/lib/PHPSpreadsheet/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Statistical/Distributions/F.php on line 9

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser errors were detected

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
Please fix the following attributes:
  • Tags: You are using too many tags: 19 tag instead of maximum 10
The official readme.txt might help

order-tracking/order-tracking.php 85% from 13 tests

"Order Tracking - WordPress Status Tracking Plugin" version 3.3.8's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
Please make the necessary changes and fix the following:
  • Requires at least: Required version must be the same as the one declared in readme.txt ("5.0" instead of "7.1")
  • Description: Keep the plugin description shorter than 140 characters (currently 165 characters long)

Code Analysis 95% from 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
Success! There were no dangerous files found in this plugin105,400 lines of code in 778 files:
LanguageFilesBlank linesComment linesLines of code
PHP65322,05442,99790,744
PO File152,1773,8285,253
CSS202921913,906
JavaScript708043833,267
Markdown1041101,855
JSON300245
YAML5191284
Bourne Again Shell16324
XML10022

PHP code 0% from 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
These items need your attention
  • Cyclomatic complexity of classes should be reduced to less than 1000 (currently 1,020)
  • Cyclomatic complexity of methods has to be reduced to less than 100 (currently 333)
Cyclomatic complexity
Average complexity per logical line of code0.38
Average class complexity24.76
▷ Minimum class complexity1.00
▷ Maximum class complexity1,020.00
Average method complexity3.59
▷ Minimum method complexity1.00
▷ Maximum method complexity333.00
Code structure
Namespaces73
Interfaces14
Traits1
Classes572
▷ Abstract classes305.24%
▷ Concrete classes54294.76%
▷ Final classes20.37%
Methods5,448
▷ Static methods1,62029.74%
▷ Public methods4,07174.72%
▷ Protected methods2224.07%
▷ Private methods1,15521.20%
Functions88
▷ Named functions3034.09%
▷ Anonymous functions5865.91%
Constants1,411
▷ Global constants80.57%
▷ Class constants1,40399.43%
▷ Public constants1,23688.10%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
62 PNG files occupy 3.42MB with 2.22MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/img/ewd-uasp-dashboard-banner.png150.62KB77.17KB▼ 48.76%
assets/img/options-asset-exclamation.png2.44KB1.39KB▼ 43.07%
assets/img/ewd-support-icon-documentation.png2.13KB0.73KB▼ 65.63%
assets/img/streamlined.png345.79KB4.38KB▼ 98.73%
assets/img/ewd-uwpm-icon.png183.39KB59.73KB▼ 67.43%