78% shipment-tracker-for-woocommerce

Code Review | Shipment Tracker for Woocommerce

WordPress plugin Shipment Tracker for Woocommerce scored78%from 54 tests.

About plugin

  • Plugin page: shipment-tracker-...
  • Plugin version: 1.3.8
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-6.2.2
  • WordPress version: 6.3.1
  • First release: Feb 5, 2021
  • Latest release: Oct 30, 2023
  • Number of updates: 21
  • Update frequency: every 47.5 days
  • Top authors: bitsstech (100%)

Code review

54 tests

User reviews

19 reviews

Install metrics

800+ active /9,783 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Installer ran successfully

Server metrics [RAM: ▲0.27MB] [CPU: ▼4.40ms] Passed 4 tests

This is a short check of server-side resources used by Shipment Tracker for Woocommerce
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.75 ▲0.2837.88 ▼5.19
Dashboard /wp-admin3.59 ▲0.2451.74 ▼12.46
Posts /wp-admin/edit.php3.71 ▲0.3548.58 ▲0.45
Add New Post /wp-admin/post-new.php6.17 ▲0.2890.47 ▼0.41
Media Library /wp-admin/upload.php3.52 ▲0.2840.89 ▲7.48

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

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 574 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
db_upgraded
widget_recent-posts
widget_theysaidso_widget
can_compress_scripts
theysaidso_admin_options

Browser metrics Passed 4 tests

This is an overview of browser requirements for Shipment Tracker for Woocommerce
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,795 ▲4914.28 ▲0.061.83 ▼0.3742.90 ▼1.71
Dashboard /wp-admin2,198 ▲245.55 ▼0.0989.84 ▼6.5038.80 ▼5.21
Posts /wp-admin/edit.php2,107 ▲71.98 ▼0.0034.93 ▼1.1432.54 ▼4.04
Add New Post /wp-admin/post-new.php1,537 ▲923.30 ▲0.56653.78 ▲12.5357.38 ▲6.26
Media Library /wp-admin/upload.php1,403 ▼04.19 ▼0.0698.37 ▼2.9341.49 ▲0.03

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-posts
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-comments

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 0% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
The following issues need your attention
  • 6× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/shipment-tracker-for-woocommerce/admin/partials/bt-sync-shipment-tracking-admin-display.php
    • > /wp-content/plugins/shipment-tracker-for-woocommerce/admin/partials/bt-st-buy-premium-feature-tab.php
    • > /wp-content/plugins/shipment-tracker-for-woocommerce/includes/licenser/partials/premium_conformation_login_form.php
    • > /wp-content/plugins/shipment-tracker-for-woocommerce/admin/partials/order_shipment_details.php
    • > /wp-content/plugins/shipment-tracker-for-woocommerce/vendor/htmlburger/carbon-fields/templates/Exception/incorrect-syntax.php
    • > /wp-content/plugins/shipment-tracker-for-woocommerce/admin/partials/bt-shipment-deactivation-popup.php
  • 176× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'PhpUnitsOfMeasureTest\\PhysicalQuantity\\AbstractPhysicalQuantityTestCase' not found in wp-content/plugins/shipment-tracker-for-woocommerce/vendor/php-units-of-measure/php-units-of-measure/tests/PhysicalQuantity/MassTest.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'Carbon_Fields\\Service\\Service' not found in wp-content/plugins/shipment-tracker-for-woocommerce/vendor/htmlburger/carbon-fields/core/Service/Revisions_Service.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'Carbon_Fields\\Container\\Condition\\Comparer\\Comparer' not found in wp-content/plugins/shipment-tracker-for-woocommerce/vendor/htmlburger/carbon-fields/core/Container/Condition/Comparer/Equality_Comparer.php:5
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/shipment-tracker-for-woocommerce/vendor/htmlburger/carbon-fields/templates/Container/common/options-page.php:2
    • > PHP Fatal error
      Uncaught Error: Class 'Carbon_Fields\\Container\\Condition\\Comparer\\Comparer' not found in wp-content/plugins/shipment-tracker-for-woocommerce/vendor/htmlburger/carbon-fields/core/Container/Condition/Comparer/Contain_Comparer.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'Carbon_Fields\\Field\\Field' not found in wp-content/plugins/shipment-tracker-for-woocommerce/vendor/htmlburger/carbon-fields/core/Field/File_Field.php:12
    • > PHP Fatal error
      Uncaught Error: Class 'Carbon_Fields\\Container\\Container' not found in wp-content/plugins/shipment-tracker-for-woocommerce/vendor/htmlburger/carbon-fields/core/Container/Comment_Meta_Container.php:13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_post_meta() in wp-content/plugins/shipment-tracker-for-woocommerce/admin/partials/bt-manual-tracking-fields.php:2
    • > PHP Fatal error
      Uncaught Error: Class 'Carbon_Fields\\Field\\Select_Field' not found in wp-content/plugins/shipment-tracker-for-woocommerce/vendor/htmlburger/carbon-fields/core/Field/Radio_Image_Field.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'PhpUnitsOfMeasure\\AbstractPhysicalQuantity' not found in wp-content/plugins/shipment-tracker-for-woocommerce/vendor/php-units-of-measure/php-units-of-measure/source/PhysicalQuantity/Time.php:8

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
There were no browser issues found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
5 plugin tags: shipment tracking, shiprocket, shyplite, order tracking, nimbuspost

shipment-tracker-for-woocommerce/bt-sync-shipment-tracking.php 85% from 13 tests

The main file in "Shipment Tracker for Woocommerce" v. 1.3.8 serves as a complement to information provided in readme.txt and as the entry point to the plugin
The following require your attention:
  • Main file name: Name the main plugin file the same as the plugin slug ("shipment-tracker-for-woocommerce.php" instead of "bt-sync-shipment-tracking.php")
  • Text Domain: If you choose to specify the text domain, it must be the same as the plugin slug; optional since WordPress version 4.6

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Good job! No executable or dangerous file extensions detected39,494 lines of code in 507 files:
LanguageFilesBlank linesComment linesLines of code
PHP2334,0228,47518,028
JavaScript1745,2508,54113,431
CSS115951,1592,976
PO File268191,0202,202
Sass4833901,769
JSON5100473
Markdown51220367
HTML1720186
XML28029
YAML15020
SVG11013

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.27
Average class complexity8.56
▷ Minimum class complexity1.00
▷ Maximum class complexity161.00
Average method complexity2.19
▷ Minimum method complexity1.00
▷ Maximum method complexity44.00
Code structure
Namespaces29
Interfaces7
Traits1
Classes185
▷ Abstract classes147.57%
▷ Concrete classes17192.43%
▷ Final classes10.58%
Methods1,225
▷ Static methods13811.27%
▷ Public methods1,00281.80%
▷ Protected methods20316.57%
▷ Private methods201.63%
Functions152
▷ Named functions3019.74%
▷ Anonymous functions12280.26%
Constants56
▷ Global constants1119.64%
▷ Class constants4580.36%
▷ Public constants2862.22%

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
1 PNG file occupies 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
public/images/searchicon.png0.84KB0.46KB▼ 45.23%