79% woo-orders-tracking

Code Review | Orders Tracking for WooCommerce

WordPress plugin Orders Tracking for WooCommerce scored79%from 54 tests.

About plugin

  • Plugin page: woo-orders-tracking
  • Plugin version: 1.2.7
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0.0-6.3
  • WordPress version: 6.3.1
  • First release: May 7, 2019
  • Latest release: Oct 6, 2023
  • Number of updates: 64
  • Update frequency: every 25.2 days
  • Top authors: kimvt1991 (57.81%)mytrinh (37.5%)mrt3vn (7.81%)

Code review

54 tests

User reviews

51 reviews

Install metrics

10,000+ active /245,748 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
This plugin's installer ran successfully

Server metrics [RAM: ▲0.45MB] [CPU: ▼6.37ms] Passed 4 tests

This is a short check of server-side resources used by Orders Tracking for WooCommerce
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.91 ▲0.4545.25 ▲5.32
Dashboard /wp-admin3.81 ▲0.4651.88 ▼8.75
Posts /wp-admin/edit.php3.86 ▲0.5047.90 ▼3.09
Add New Post /wp-admin/post-new.php6.33 ▲0.4483.18 ▼18.50
Media Library /wp-admin/upload.php3.67 ▲0.4438.11 ▲4.85

Server storage [IO: ▲3.30MB] [DB: ▲0.03MB] Passed 3 tests

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 114 new files
Database: 1 new table, 7 new options
New tables
wp_wotv_woo_track_info
New WordPress options
widget_recent-posts
db_upgraded
theysaidso_admin_options
widget_recent-comments
can_compress_scripts
woo_orders_tracking_settings
widget_theysaidso_widget

Browser metrics Passed 4 tests

An overview of browser requirements for Orders Tracking for WooCommerce
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,798 ▲5214.36 ▲0.001.67 ▲0.1343.30 ▲4.80
Dashboard /wp-admin2,207 ▲305.62 ▼0.0193.55 ▲7.3343.18 ▲1.10
Posts /wp-admin/edit.php2,107 ▲72.03 ▲0.0833.75 ▼7.1034.51 ▼2.77
Add New Post /wp-admin/post-new.php1,542 ▲1423.01 ▼0.16613.15 ▼68.7349.74 ▼3.51
Media Library /wp-admin/upload.php1,412 ▲124.22 ▲0.0994.00 ▲0.7741.11 ▼2.86

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • Zombie tables were found after uninstall: 1 table
    • wp_wotv_woo_track_info
  • This plugin did not uninstall successfully, leaving 7 options in the database
    • db_upgraded
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_recent-comments
    • woo_orders_tracking_settings
    • widget_theysaidso_widget
    • can_compress_scripts

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP Passed 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
The SRP test was a success

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
These attributes need to be fixed:
  • Tags: You are using too many tags: 11 tag instead of maximum 10
You can take inspiration from this readme.txt

woo-orders-tracking/woo-orders-tracking.php Passed 13 tests

The main PHP file in "Orders Tracking for WooCommerce" ver. 1.2.7 adds more information about the plugin and also serves as the entry point for this plugin
117 characters long description:
Easily import/manage your tracking numbers, add tracking numbers to PayPal and send email notifications to customers.

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
No dangerous file extensions were detected28,385 lines of code in 90 files:
LanguageFilesBlank linesComment linesLines of code
PHP3075982814,752
JavaScript221,3374557,685
PO File29581,3892,539
CSS334341982,176
SVG3261,233

PHP code 50% from 2 tests

This plugin's cyclomatic complexity and code structure detailed below
Please tend to the following items
  • Cyclomatic complexity of methods has to be reduced to less than 100 (currently 135)
Cyclomatic complexity
Average complexity per logical line of code0.48
Average class complexity61.93
▷ Minimum class complexity2.00
▷ Maximum class complexity328.00
Average method complexity6.79
▷ Minimum method complexity1.00
▷ Maximum method complexity135.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes29
▷ Abstract classes00.00%
▷ Concrete classes29100.00%
▷ Final classes00.00%
Methods305
▷ Static methods11537.70%
▷ Public methods25081.97%
▷ Protected methods154.92%
▷ Private methods4013.11%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants18
▷ Global constants18100.00%
▷ Class constants00.00%
▷ Public constants00.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
2 PNG files occupy 0.01MB with 0.00MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/fs-sprite.png0.22KB0.18KB▼ 15.63%
assets/images/paypal.png4.91KB2.89KB▼ 41.12%