10% ltl-freight-quotes-unishippers-edition

Code Review | LTL Freight Quotes - Unishippers Edition

WordPress plugin LTL Freight Quotes - Unishippers Edition scored10%from 54 tests.

About plugin

  • Plugin page: ltl-freight-quote...
  • Plugin version: 2.4.2
  • PHP version: 7.4.16
  • WordPress compatibility: 6.4-6.3.1
  • WordPress version: 6.3.1
  • First release: May 27, 2020
  • Latest release: Sep 12, 2023
  • Number of updates: 34
  • Update frequency: every 35.4 days
  • Top authors: enituretechnology (100%)

Code review

54 tests

User reviews

1 review

Install metrics

30+ active /2,379 total downloads

Benchmarks

Plugin footprint 23% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
You still need to fix the following installer errors
  • The plugin did not install without errors
    • > Notice in wp-content/plugins/ltl-freight-quotes-unishippers-edition/unishipper-ltl-carrier-list.php+31
    Undefined offset: 0

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

Server-side resources used by LTL Freight Quotes - Unishippers Edition
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /4.79 ▲1.3346.06 ▲7.41
Dashboard /wp-admin4.22 ▲0.8834.47 ▼22.79
Posts /wp-admin/edit.php4.22 ▲0.8633.00 ▼13.78
Add New Post /wp-admin/post-new.php4.22 ▼1.6733.82 ▼75.29
Media Library /wp-admin/upload.php4.22 ▲0.9940.00 ▲7.78

Server storage [IO: ▲1.51MB] [DB: ▲0.08MB] Passed 3 tests

Analyzing filesystem and database footprints of this plugin
This plugin installed successfully
Filesystem: 145 new files
Database: 2 new tables, 15 new options
New tables
wp_warehouse
wp_unishippers_freight
New WordPress options
unishippers_freight_packages_quotes_package
can_compress_scripts
db_upgraded
en_async_orders_exporting_process
unishippers_freight_package_expire_date
widget_theysaidso_widget
en_orders_ids_flag
en_orders_ids
theysaidso_admin_options
unishippers_freight_package_expire_days
...

Browser metrics Passed 4 tests

An overview of browser requirements for LTL Freight Quotes - Unishippers Edition
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,946 ▲20013.75 ▼0.625.64 ▲3.9837.39 ▼1.33
Dashboard /wp-admin2,243 ▲575.06 ▲0.15104.76 ▼3.8242.52 ▼0.18
Posts /wp-admin/edit.php2,129 ▲402.33 ▲0.1935.22 ▲0.4133.32 ▼4.10
Add New Post /wp-admin/post-new.php1,551 ▲3222.94 ▼0.25651.28 ▲26.6738.37 ▼9.72
Media Library /wp-admin/upload.php1,425 ▲374.38 ▲0.22114.41 ▲19.9348.26 ▲3.81

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
The following items require your attention
  • The plugin did not uninstall gracefully
    • > Warning in wp-admin/includes/plugin.php+294
    opendir(wp-content/plugins/woocommerce): failed to open dir: No such file or directory
  • Zombie tables were found after uninstall: 2 tables
    • wp_unishippers_freight
    • wp_warehouse
  • The uninstall procedure has failed, leaving 11 options in the database
    • db_upgraded
    • widget_recent-comments
    • en_orders_ids_flag
    • en_orders_ids
    • can_compress_scripts
    • widget_recent-posts
    • en_async_orders_exporting_process
    • widget_theysaidso_widget
    • en_unishippers_freight_update_now
    • theysaidso_admin_options
    • ...

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Everything seems fine, however this is by no means an exhaustive test

SRP 50% 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
  • 5× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/ltl-freight-quotes-unishippers-edition/order/en-order-widget.php:17
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/ltl-freight-quotes-unishippers-edition/order/rates/order-rates.php:13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/ltl-freight-quotes-unishippers-edition/product/en-product-detail.php:24
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/ltl-freight-quotes-unishippers-edition/order/en-order-export.php:14
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/ltl-freight-quotes-unishippers-edition/template/csv-export.php:9

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)
Everything seems fine on the user side

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
These attributes need your attention:
  • Tags: You are using too many tags: 16 tag instead of maximum 10
The official readme.txt might help

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

This is the main PHP file of "LTL Freight Quotes - Unishippers Edition" version 2.4.2, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
The following require your attention:
  • Requires at least: The required version number must match the one declared in readme.txt ("6.2" instead of "6.4")
  • 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 | 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 detected10,331 lines of code in 43 files:
LanguageFilesBlank linesComment linesLines of code
PHP351,1891,2577,360
JavaScript54246122,064
CSS318038907

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.50
Average class complexity44.18
▷ Minimum class complexity3.00
▷ Maximum class complexity193.00
Average method complexity6.16
▷ Minimum method complexity1.00
▷ Maximum method complexity93.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes22
▷ Abstract classes00.00%
▷ Concrete classes22100.00%
▷ Final classes00.00%
Methods184
▷ Static methods10.54%
▷ Public methods184100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions46
▷ Named functions4597.83%
▷ Anonymous functions12.17%
Constants9
▷ Global constants9100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
81 PNG files occupy 0.69MB with 0.41MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
Carrier_Logos/newpennmotorexpress.png5.78KB3.31KB▼ 42.77%
Carrier_Logos/clni.png7.71KB3.23KB▼ 58.08%
Carrier_Logos/btvp.png9.14KB3.16KB▼ 65.43%
Carrier_Logos/ward.png7.88KB3.43KB▼ 56.51%
Carrier_Logos/dphe.png18.21KB4.69KB▼ 74.25%