89% yith-woocommerce-order-tracking

Code Review | YITH WooCommerce Order & Shipment Tracking

WordPress plugin YITH WooCommerce Order & Shipment Tracking scored89%from 54 tests.

About plugin

  • Plugin page: yith-woocommerce-...
  • Plugin version: 2.20.0
  • PHP version: 7.4.16
  • WordPress compatibility: 8.1-6.4
  • WordPress version: 6.3.1
  • First release: Feb 2, 2015
  • Latest release: Nov 22, 2023
  • Number of updates: 154
  • Update frequency: every 20.9 days
  • Top authors: yithemes (100%)

Code review

54 tests

User reviews

14 reviews

Install metrics

10,000+ active /478,799 total downloads

Benchmarks

Plugin footprint 83% from 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.03MB] [CPU: ▼0.72ms] Passed 4 tests

This is a short check of server-side resources used by YITH WooCommerce Order & Shipment Tracking
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0336.35 ▼1.38
Dashboard /wp-admin3.33 ▲0.0346.03 ▼0.39
Posts /wp-admin/edit.php3.38 ▲0.0352.45 ▲7.16
Add New Post /wp-admin/post-new.php5.91 ▲0.0393.57 ▼7.16
Media Library /wp-admin/upload.php3.25 ▲0.0236.57 ▲6.06

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 305 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-comments
can_compress_scripts
widget_recent-posts
db_upgraded
widget_theysaidso_widget
theysaidso_admin_options
yit_recently_activated

Browser metrics Passed 4 tests

Checking browser requirements for YITH WooCommerce Order & Shipment Tracking
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,796 ▲914.73 ▲0.391.55 ▼0.3936.13 ▼12.54
Dashboard /wp-admin2,201 ▲275.58 ▲0.0392.86 ▲0.9942.24 ▲2.43
Posts /wp-admin/edit.php2,107 ▲72.03 ▲0.0840.12 ▼3.7535.90 ▼4.03
Add New Post /wp-admin/post-new.php1,532 ▲623.61 ▲0.67603.42 ▼46.1362.55 ▲7.89
Media Library /wp-admin/upload.php1,406 ▲64.19 ▲0.0097.69 ▲3.5940.96 ▲0.18

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
The following items require your attention
  • Zombie WordPress options detected upon uninstall: 7 options
    • db_upgraded
    • yit_recently_activated
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-posts

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Everything seems fine, however 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
The SRP test was a success

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 90% from 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
6 plugin tags: carrier, shipping, delivery, yith, woocommerce...

yith-woocommerce-order-tracking/init.php 77% from 13 tests

"YITH WooCommerce Order & Shipment Tracking" version 2.20.0's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
Please make the necessary changes and fix the following:
  • Requires at least: The required version number did not match the one declared in readme.txt ("6.2" instead of "8.1")
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("yith-woocommerce-order-tracking.php" instead of "init.php")
  • Description: Keep the plugin description shorter than 140 characters (currently 159 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
There were no executable files found in this plugin40,746 lines of code in 254 files:
LanguageFilesBlank linesComment linesLines of code
PHP1672,6225,29214,772
CSS211,7112469,367
JavaScript481,3118289,273
PO File61,5661,9204,307
SVG10012,982
XML212945

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.51
Average class complexity46.22
▷ Minimum class complexity1.00
▷ Maximum class complexity336.00
Average method complexity4.11
▷ Minimum method complexity1.00
▷ Maximum method complexity42.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes27
▷ Abstract classes13.70%
▷ Concrete classes2696.30%
▷ Final classes00.00%
Methods380
▷ Static methods4912.89%
▷ Public methods30881.05%
▷ Protected methods5213.68%
▷ Private methods205.26%
Functions138
▷ Named functions13094.20%
▷ Anonymous functions85.80%
Constants20
▷ Global constants1995.00%
▷ Class constants15.00%
▷ Public constants1100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
29 compressed PNG files occupy 0.06MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
plugin-fw/assets/css/jquery-ui/images/ui-icons_cd0a0a_256x240.png3.69KB4.18KB0.00%
plugin-fw/assets/images/x.png0.70KB0.71KB0.00%
plugin-fw/assets/css/jquery-ui/images/ui-icons_2e83ff_256x240.png3.69KB4.18KB0.00%
plugin-fw/assets/css/jquery-ui/images/ui-bg_highlight-soft_75_cccccc_1x100.png0.08KB0.17KB0.00%
plugin-fw/assets/css/jquery-ui/images/ui-bg_glass_95_fef1ec_1x400.png0.11KB0.14KB0.00%