77% trackingmore-woocommerce-tracking

Code Review | TrackingMore Order Tracking for WooCommerce (Free plan available)

WordPress plugin TrackingMore Order Tracking for WooCommerce (Free plan available) scored77%from 54 tests.

About plugin

  • Plugin page: trackingmore-wooc...
  • Plugin version: 1.1.5
  • PHP version: 7.4.16
  • WordPress compatibility: 5.7-6.3
  • WordPress version: 6.3.1
  • First release: Sep 2, 2017
  • Latest release: Aug 11, 2023
  • Number of updates: 53
  • Update frequency: every 41.4 days
  • Top authors: trackingmore (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

3,000+ active /23,793 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.01MB] [CPU: ▼11.44ms] Passed 4 tests

A check of server-side resources used by TrackingMore Order Tracking for WooCommerce (Free plan available)
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0039.45 ▼1.95
Dashboard /wp-admin3.31 ▼0.0450.36 ▼16.35
Posts /wp-admin/edit.php3.42 ▲0.0751.56 ▲2.39
Add New Post /wp-admin/post-new.php5.89 ▲0.0087.83 ▼25.61
Media Library /wp-admin/upload.php3.23 ▲0.0035.84 ▼1.86

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

Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 50 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
widget_theysaidso_widget
widget_recent-posts
can_compress_scripts
theysaidso_admin_options
db_upgraded

Browser metrics Passed 4 tests

A check of browser resources used by TrackingMore Order Tracking for WooCommerce (Free plan available)
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.26 ▼0.011.58 ▼0.1546.08 ▲1.20
Dashboard /wp-admin2,195 ▲245.60 ▼0.0284.87 ▼10.3240.76 ▼1.24
Posts /wp-admin/edit.php2,100 ▼02.04 ▼0.0040.30 ▲4.9835.23 ▼1.52
Add New Post /wp-admin/post-new.php1,545 ▼023.10 ▼0.34623.09 ▼44.2953.06 ▼4.77
Media Library /wp-admin/upload.php1,400 ▼04.21 ▼0.0895.10 ▼17.2042.22 ▼8.28

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
  • This plugin does not fully uninstall, leaving 6 options in the database
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-comments
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-posts

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

SRP 0% 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
Please fix the following items
  • 2× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/trackingmore-woocommerce-tracking/includes/views/trackingmore_meta_box.php
    • > /wp-content/plugins/trackingmore-woocommerce-tracking/trackingmore.php
  • 14× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Notice
      Trying to get property 'ID' of non-object in wp-content/plugins/trackingmore-woocommerce-tracking/includes/views/trackingmore_meta_box.php on line 453
    • > PHP Notice
      Trying to get property 'ID' of non-object in wp-content/plugins/trackingmore-woocommerce-tracking/includes/views/trackingmore_meta_box.php on line 540
    • > PHP Notice
      Undefined index: trackingmore in wp-content/plugins/trackingmore-woocommerce-tracking/includes/views/trackingmore_meta_box.php on line 474
    • > PHP Notice
      Trying to get property 'couriers' of non-object in wp-content/plugins/trackingmore-woocommerce-tracking/includes/views/trackingmore_meta_box.php on line 474
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/trackingmore-woocommerce-tracking/trackingmore-fields.php:25
    • > PHP Notice
      Trying to get property 'ID' of non-object in wp-content/plugins/trackingmore-woocommerce-tracking/includes/views/trackingmore_meta_box.php on line 419
    • > PHP Notice
      Trying to get property 'couriers' of non-object in wp-content/plugins/trackingmore-woocommerce-tracking/includes/views/trackingmore_meta_box.php on line 262
    • > PHP Warning
      file_get_contents(/assets/js/couriers.json): failed to open stream: No such file or directory in wp-content/plugins/trackingmore-woocommerce-tracking/couriers.php on line 2
    • > PHP Notice
      Trying to get property 'ID' of non-object in wp-content/plugins/trackingmore-woocommerce-tracking/includes/views/trackingmore_meta_box.php on line 390
    • > PHP Notice
      Trying to get property 'ID' of non-object in wp-content/plugins/trackingmore-woocommerce-tracking/includes/views/trackingmore_meta_box.php on line 100

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 83% from 29 tests

readme.txt 88% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
Attributes that require attention: The official readme.txt might help

trackingmore-woocommerce-tracking/trackingmore.php 77% from 13 tests

The main PHP file in "TrackingMore Order Tracking for WooCommerce (Free plan available)" ver. 1.1.5 adds more information about the plugin and also serves as the entry point for this plugin
It is important to fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("trackingmore-woocommerce-tracking.php" instead of "trackingmore.php")
  • Description: Keep the plugin description shorter than 140 characters (currently 143 characters long)
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
No dangerous file extensions were detected19,036 lines of code in 41 files:
LanguageFilesBlank linesComment linesLines of code
JSON2007,814
JavaScript1332175,711
PO File21,4291,4342,871
PHP186331102,611
CSS54116
SVG10013

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.41
Average class complexity26.45
▷ Minimum class complexity1.00
▷ Maximum class complexity71.00
Average method complexity3.80
▷ Minimum method complexity1.00
▷ Maximum method complexity17.00
Code structure
Namespaces0
Interfaces1
Traits0
Classes10
▷ Abstract classes00.00%
▷ Concrete classes10100.00%
▷ Final classes110.00%
Methods104
▷ Static methods54.81%
▷ Public methods8278.85%
▷ Protected methods87.69%
▷ Private methods1413.46%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants15
▷ Global constants16.67%
▷ Class constants1493.33%
▷ Public constants14100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
2 compressed PNG files occupy 0.00MB
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/plugin/chosen/chosen-sprite@2x.png0.72KB0.83KB0.00%
assets/plugin/chosen/chosen-sprite.png0.53KB0.88KB0.00%