63% ltl-freight-quotes-globaltranz-edition

Code Review | LTL Freight Quotes – GlobalTranz Edition

WordPress plugin LTL Freight Quotes – GlobalTranz Edition scored63%from 54 tests.

About plugin

  • Plugin page: ltl-freight-quote...
  • Plugin version: 2.2.3
  • PHP version: 7.4.16
  • WordPress compatibility: 6.4-6.3
  • WordPress version: 6.3.1
  • First release: Dec 30, 2020
  • Latest release: Sep 20, 2023
  • Number of updates: 38
  • Update frequency: every 26.3 days
  • Top authors: enituretechnology (100%)

Code review

54 tests

User reviews

1 review

Install metrics

30+ active /2,076 total downloads

Benchmarks

Plugin footprint 48% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.51MB] [CPU: ▼16.82ms] Passed 4 tests

A check of server-side resources used by LTL Freight Quotes – GlobalTranz Edition
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /4.89 ▲1.4354.30 ▲13.48
Dashboard /wp-admin4.45 ▲1.1534.78 ▼17.47
Posts /wp-admin/edit.php4.45 ▲1.1034.55 ▼8.27
Add New Post /wp-admin/post-new.php4.45 ▼1.4345.86 ▼46.16
Media Library /wp-admin/upload.php4.45 ▲1.2337.96 ▲4.61

Server storage [IO: ▲1.47MB] [DB: ▲0.01MB] Passed 3 tests

Filesystem and database footprint
The plugin installed successfully
Filesystem: 140 new files
Database: 3 new tables, 21 new options
New tables
wp_gt_carriers
wp_warehouse
wp_en_cerasis_account_carriers
New WordPress options
wc_cerasis_edition
eniture_plugin_15
wc_cerasis_db_version
en_orders_ids_flag
en_old_user_dropship_status
en_orders_ids
cerasis_freight_package
db_upgraded
en_old_user_warehouse_status
engtz_cerasis_update_now
...

Browser metrics Passed 4 tests

LTL Freight Quotes – GlobalTranz Edition: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,967 ▲22113.69 ▼1.086.17 ▲4.3845.78 ▲2.71
Dashboard /wp-admin2,261 ▲765.09 ▼0.79105.22 ▼3.7542.87 ▼4.21
Posts /wp-admin/edit.php2,152 ▲632.48 ▲0.4343.41 ▲3.7038.04 ▲1.03
Add New Post /wp-admin/post-new.php1,421 ▼10320.66 ▼2.49572.85 ▼122.4059.64 ▲5.04
Media Library /wp-admin/upload.php1,446 ▲614.27 ▲0.0499.71 ▼5.7739.07 ▼4.42

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • Uninstall procedure validation failed for this plugin
    • > Warning in wp-admin/includes/plugin.php+294
    opendir(wp-content/plugins/woocommerce): failed to open dir: No such file or directory
  • The uninstall procedure failed, leaving 3 tables in the database
    • wp_warehouse
    • wp_gt_carriers
    • wp_en_cerasis_account_carriers
  • The uninstall procedure has failed, leaving 17 options in the database
    • en_old_user_hazmat_status
    • engtz_cerasis_update_now
    • en_async_orders_exporting_process
    • db_upgraded
    • widget_recent-posts
    • en_old_user_warehouse_status
    • cerasis_freights_web_hook_plan_requests
    • en_old_user_dropship_status
    • en_orders_ids_flag
    • wc_cerasis_edition
    • ...

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 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
Please fix the following items
  • 6× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/ltl-freight-quotes-globaltranz-edition/orders/en-order-export.php:14
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/ltl-freight-quotes-globaltranz-edition/orders/assets/js/admin_order.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/ltl-freight-quotes-globaltranz-edition/includes/templates/csv-export.php:9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/ltl-freight-quotes-globaltranz-edition/orders/rates/order-rates.php:13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/ltl-freight-quotes-globaltranz-edition/orders/en-order-widget.php:16
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/ltl-freight-quotes-globaltranz-edition/product/en-product-detail.php:23

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
There were not plugin tags detected

ltl-freight-quotes-globaltranz-edition/ltl-freight-quotes-globaltranz-edition.php 85% from 13 tests

Analyzing the main PHP file in "LTL Freight Quotes – GlobalTranz Edition" version 2.2.3
It is important to fix the following:
  • Text Domain: The text domain is optional since WordPress version 4.6; if you do specify it, it must be the same as the plugin slug
  • Requires at least: Required version must match the one declared in readme.txt ("6.2" instead of "6.4")

Code Analysis 97% from 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
Success! There were no dangerous files found in this plugin12,310 lines of code in 58 files:
LanguageFilesBlank linesComment linesLines of code
PHP491,5101,7038,962
JavaScript54916212,251
CSS4189341,097

PHP code 50% from 2 tests

This plugin's cyclomatic complexity and code structure detailed below
These items need your attention
  • Cyclomatic complexity of methods should be reduced to less than 100 (currently 123)
Cyclomatic complexity
Average complexity per logical line of code0.53
Average class complexity38.54
▷ Minimum class complexity1.00
▷ Maximum class complexity282.00
Average method complexity6.36
▷ Minimum method complexity1.00
▷ Maximum method complexity123.00
Code structure
Namespaces2
Interfaces0
Traits0
Classes37
▷ Abstract classes00.00%
▷ Concrete classes37100.00%
▷ Final classes00.00%
Methods259
▷ Static methods218.11%
▷ Public methods259100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions37
▷ Named functions3697.30%
▷ Anonymous functions12.70%
Constants10
▷ Global constants10100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
73 PNG files occupy 0.64MB with 0.34MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/carrier-logos/wtva.png5.07KB2.66KB▼ 47.67%
assets/carrier-logos/rjwi.png8.24KB3.03KB▼ 63.25%
assets/carrier-logos/jbh.png3.91KB2.64KB▼ 32.52%
assets/carrier-logos/dafg.png13.28KB4.97KB▼ 62.56%
assets/carrier-logos/webe.png9.63KB3.68KB▼ 61.81%