89% wc-order-tracker

Code Review | Order Tracker for WooCommerce

WordPress plugin Order Tracker for WooCommerce scored89%from 54 tests.

About plugin

  • Plugin page: wc-order-tracker
  • Plugin version: 1.2.1
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-6.4
  • WordPress version: 6.3.1
  • First release: Aug 14, 2020
  • Latest release: Oct 3, 2023
  • Number of updates: 18
  • Update frequency: every 63.6 days
  • Top authors: hmbashar (100%)

Code review

54 tests

User reviews

6 reviews

Install metrics

500+ active /4,396 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▲0.06MB] [CPU: ▼3.51ms] Passed 4 tests

This is a short check of server-side resources used by Order Tracker for WooCommerce
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0741.82 ▼8.04
Dashboard /wp-admin3.36 ▲0.0651.95 ▲1.89
Posts /wp-admin/edit.php3.47 ▲0.1248.40 ▼0.43
Add New Post /wp-admin/post-new.php5.94 ▲0.0588.27 ▼7.45
Media Library /wp-admin/upload.php3.28 ▲0.0544.78 ▲5.72

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 28 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_recent-posts
widget_recent-comments
db_upgraded
can_compress_scripts
widget_theysaidso_widget

Browser metrics Passed 4 tests

A check of browser resources used by Order Tracker for WooCommerce
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,917 ▲15613.42 ▼1.338.85 ▲6.6443.32 ▼1.48
Dashboard /wp-admin2,211 ▲315.63 ▲0.0287.85 ▼11.3843.04 ▲0.55
Posts /wp-admin/edit.php2,110 ▲132.00 ▼0.1034.67 ▼0.0833.90 ▼1.11
Add New Post /wp-admin/post-new.php1,539 ▲1023.73 ▲0.52678.14 ▼2.0966.31 ▲13.21
Media Library /wp-admin/upload.php1,413 ▲134.23 ▲0.15109.87 ▼4.2147.56 ▲0.28

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • can_compress_scripts
    • widget_recent-posts
    • db_upgraded
    • widget_recent-comments
    • widget_theysaidso_widget
    • theysaidso_admin_options

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)
Even though no errors were found, this is by no means an exhaustive test

SRP Passed 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
Looking good! No server-side errors or output on direct access of PHP files

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
There were no browser issues found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
These attributes need to be fixed: You can take inspiration from this readme.txt

wc-order-tracker/cbwct.php 85% from 13 tests

The primary PHP file in "Order Tracker for WooCommerce" version 1.2.1 is used by WordPress to initiate all plugin functionality
The following require your attention:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("wc-order-tracker.php" instead of "cbwct.php")
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug

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
No dangerous file extensions were detected875 lines of code in 15 files:
LanguageFilesBlank linesComment linesLines of code
PHP1114255471
CSS3596379
JavaScript14025

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.35
Average class complexity15.00
▷ Minimum class complexity15.00
▷ Maximum class complexity15.00
Average method complexity3.00
▷ Minimum method complexity1.00
▷ Maximum method complexity6.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes1100.00%
Methods7
▷ Static methods685.71%
▷ Public methods7100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions19
▷ Named functions19100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.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
11 PNG files occupy 0.43MB with 0.22MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
img/delivered.png5.86KB4.92KB▼ 15.92%
img/payment.png16.85KB6.89KB▼ 59.09%
img/delivery.png18.04KB7.06KB▼ 60.86%
screenshots/Screenshot_1.png52.71KB20.04KB▼ 61.97%
screenshots/Screenshot_3.png68.79KB24.27KB▼ 64.72%