73% ltl-freight-quotes-xpo-edition

Code Review | LTL Freight Quotes - XPO Edition

WordPress plugin LTL Freight Quotes - XPO Edition scored73%from 54 tests.

About plugin

  • Plugin page: ltl-freight-quote...
  • Plugin version: 4.2.6
  • PHP version: 7.4.16
  • WordPress compatibility: 6.4-6.4.1
  • WordPress version: 6.3.1
  • First release: Apr 28, 2017
  • Latest release: Nov 16, 2023
  • Number of updates: 76
  • Update frequency: every 31.5 days
  • Top authors: enituretechnology (100%)

Code review

54 tests

User reviews

1 review

Install metrics

50+ active /4,210 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Install script ran successfully

Server metrics [RAM: ▼0.84MB] [CPU: ▼33.62ms] Passed 4 tests

An overview of server-side resources used by LTL Freight Quotes - XPO Edition
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.55 ▲0.0834.15 ▼7.52
Dashboard /wp-admin3.10 ▼0.2023.16 ▼25.70
Posts /wp-admin/edit.php3.10 ▼0.2625.69 ▼23.59
Add New Post /wp-admin/post-new.php3.10 ▼2.7926.24 ▼71.27
Media Library /wp-admin/upload.php3.10 ▼0.1320.69 ▼13.91

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 59 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
db_upgraded
widget_recent-comments
widget_recent-posts
widget_theysaidso_widget
can_compress_scripts

Browser metrics Passed 4 tests

LTL Freight Quotes - XPO 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,912 ▲15013.74 ▼0.509.91 ▲8.0044.46 ▼1.56
Dashboard /wp-admin2,205 ▲255.53 ▼0.1392.20 ▼3.2245.80 ▲3.78
Posts /wp-admin/edit.php2,114 ▲142.10 ▲0.1639.70 ▲0.6636.80 ▼1.24
Add New Post /wp-admin/post-new.php1,539 ▲1223.71 ▲0.61618.30 ▼56.4048.52 ▼14.56
Media Library /wp-admin/upload.php1,413 ▲134.18 ▼0.1299.21 ▼7.1049.62 ▲4.26

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
These 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
  • This plugin did not uninstall successfully, leaving 7 options in the database
    • xpo_quotes_web_hook_plan_requests
    • theysaidso_admin_options
    • widget_recent-posts
    • db_upgraded
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-comments

Smoke tests 75% 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)
Good news, no errors were detected

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 items
  • 5× 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-xpo-edition/order/rates/order-rates.php:13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/ltl-freight-quotes-xpo-edition/order/en-order-widget.php:16
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/ltl-freight-quotes-xpo-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-xpo-edition/template/csv-export.php:9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/ltl-freight-quotes-xpo-edition/product/en-product-detail.php:23

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser errors were detected

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
Please fix the following attributes:
  • Tags: There are too many tags (16 tag instead of maximum 10)
Please take inspiration from this readme.txt

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

"LTL Freight Quotes - XPO Edition" version 4.2.6's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
The following require your attention:
  • 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
  • Requires at least: Required version must be the same as 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 | Executable files are not allowed as they can serve as attack vectors
No dangerous file extensions were detected11,210 lines of code in 46 files:
LanguageFilesBlank linesComment linesLines of code
PHP361,1091,2187,057
JavaScript65497492,815
CSS4254761,338

PHP code 50% from 2 tests

An overview of cyclomatic complexity and code structure
Please tend to the following items
  • Please reduce cyclomatic complexity of methods to less than 100 (currently 121)
Cyclomatic complexity
Average complexity per logical line of code0.52
Average class complexity50.25
▷ Minimum class complexity1.00
▷ Maximum class complexity217.00
Average method complexity7.27
▷ Minimum method complexity1.00
▷ Maximum method complexity121.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes20
▷ Abstract classes00.00%
▷ Concrete classes20100.00%
▷ Final classes00.00%
Methods157
▷ Static methods10.64%
▷ Public methods157100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions51
▷ Named functions5098.04%
▷ Anonymous functions11.96%
Constants3
▷ Global constants3100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
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/edit.png3.09KB0.70KB▼ 77.43%
warehouse-dropship/wild/assets/images/delete.png3.49KB0.86KB▼ 75.41%
asset/edit.png3.09KB0.70KB▼ 77.43%
asset/delete.png3.49KB0.86KB▼ 75.41%