67% ltl-freight-quotes-saia-edition

Code Review | LTL Freight Quotes - SAIA Edition

WordPress plugin LTL Freight Quotes - SAIA Edition scored67%from 54 tests.

About plugin

  • Plugin page: ltl-freight-quote...
  • Plugin version: 2.2.5
  • PHP version: 7.4.16
  • WordPress compatibility: 6.4-6.4
  • WordPress version: 6.3.1
  • First release: Jun 17, 2019
  • Latest release: Nov 16, 2023
  • Number of updates: 46
  • Update frequency: every 36.8 days
  • Top authors: enituretechnology (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active /2,043 total downloads

Benchmarks

Plugin footprint 65% 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.85MB] [CPU: ▼37.28ms] Passed 4 tests

This is a short check of server-side resources used by LTL Freight Quotes - SAIA Edition
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.54 ▲0.0736.83 ▼2.54
Dashboard /wp-admin3.09 ▼0.2123.80 ▼26.18
Posts /wp-admin/edit.php3.09 ▼0.2723.19 ▼21.84
Add New Post /wp-admin/post-new.php3.09 ▼2.8024.70 ▼90.90
Media Library /wp-admin/upload.php3.09 ▼0.1423.43 ▼10.18

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

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 58 new files
Database: no new tables, 7 new options
New WordPress options
db_upgraded
widget_recent-posts
theysaidso_admin_options
can_compress_scripts
widget_theysaidso_widget
widget_recent-comments
saia_ltl_hold_at_terminal_remove_address

Browser metrics Passed 4 tests

LTL Freight Quotes - SAIA Edition: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,921 ▲15913.44 ▼0.908.91 ▲7.0638.19 ▼5.12
Dashboard /wp-admin2,217 ▲405.85 ▲0.1996.31 ▼10.6039.88 ▼11.82
Posts /wp-admin/edit.php2,126 ▲262.18 ▲0.2249.96 ▲9.7536.53 ▲0.87
Add New Post /wp-admin/post-new.php1,548 ▲2223.34 ▼0.27664.87 ▲61.0569.54 ▲15.39
Media Library /wp-admin/upload.php1,419 ▲254.23 ▲0.01100.06 ▲2.6742.59 ▲2.60

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • 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
  • This plugin does not fully uninstall, leaving 8 options in the database
    • widget_recent-posts
    • widget_recent-comments
    • saia_ltl_hold_at_terminal_remove_address
    • saia_quotes_web_hook_plan_requests
    • db_upgraded
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_theysaidso_widget

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though everything seems fine, this is not 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
Almost there! Just fix the following items
  • 1× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/ltl-freight-quotes-saia-edition/logs/en-json-tree-view/en-jtv.php
  • 6× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/ltl-freight-quotes-saia-edition/order/en-order-export.php:14
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/ltl-freight-quotes-saia-edition/order/en-order-widget.php:16
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/ltl-freight-quotes-saia-edition/template/csv-export.php:9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/ltl-freight-quotes-saia-edition/product/en-product-detail.php:24
    • > PHP Fatal error
      Uncaught Error: Class 'SAIA_Curl_Request' not found in wp-content/plugins/ltl-freight-quotes-saia-edition/logs/en-logs.php:44
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/ltl-freight-quotes-saia-edition/order/rates/order-rates.php:13

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine on the user side

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
Attributes that require attention:
  • Tags: Please reduce the number of tags, currently 16 tag instead of maximum 10
Please take inspiration from this readme.txt

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

"LTL Freight Quotes - SAIA Edition" version 2.2.5's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
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: The required version number 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 | An overview of files in this plugin; executable files are not allowed
Everything looks great! No dangerous files found in this plugin9,504 lines of code in 46 files:
LanguageFilesBlank linesComment linesLines of code
PHP371,1041,1916,145
JavaScript65777032,348
CSS3190461,011

PHP code 50% from 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
It is recommended to fix the following
  • Cyclomatic complexity of methods has to be reduced to less than 100 (currently 121)
Cyclomatic complexity
Average complexity per logical line of code0.52
Average class complexity39.60
▷ Minimum class complexity1.00
▷ Maximum class complexity201.00
Average method complexity6.81
▷ Minimum method complexity1.00
▷ Maximum method complexity121.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes25
▷ Abstract classes00.00%
▷ Concrete classes25100.00%
▷ Final classes00.00%
Methods166
▷ Static methods10.60%
▷ Public methods166100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions50
▷ Named functions4998.00%
▷ Anonymous functions12.00%
Constants4
▷ Global constants4100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
4 PNG files occupy 0.01MB with 0.01MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
warehouse-dropship/wild/assets/images/delete_1.png3.49KB0.86KB▼ 75.41%
warehouse-dropship/wild/assets/images/edit_1.png3.09KB0.70KB▼ 77.43%
warehouse-dropship/wild/assets/images/edit.png3.09KB0.70KB▼ 77.43%
warehouse-dropship/wild/assets/images/delete.png3.49KB0.86KB▼ 75.41%