67% ltl-freight-quotes-odfl-edition

Code Review | LTL Freight Quotes - Old Dominion Edition

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

About plugin

  • Plugin page: ltl-freight-quote...
  • Plugin version: 4.2.5
  • PHP version: 7.4.16
  • WordPress compatibility: 6.4-6.4.1
  • WordPress version: 6.3.1
  • First release: May 11, 2017
  • Latest release: Nov 21, 2023
  • Number of updates: 55
  • Update frequency: every 43.5 days
  • Top authors: enituretechnology (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

10+ active /3,269 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Install script ran successfully

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

Server-side resources used by LTL Freight Quotes - Old Dominion Edition
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.55 ▲0.0940.56 ▼3.15
Dashboard /wp-admin3.10 ▼0.2025.36 ▼25.04
Posts /wp-admin/edit.php3.11 ▼0.2626.68 ▼23.35
Add New Post /wp-admin/post-new.php3.11 ▼2.7926.12 ▼66.50
Media Library /wp-admin/upload.php3.11 ▼0.1325.50 ▼9.65

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

Filesystem and database footprint
This plugin was installed successfully
Filesystem: 55 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
widget_recent-comments
can_compress_scripts
db_upgraded
widget_theysaidso_widget
theysaidso_admin_options

Browser metrics Passed 4 tests

A check of browser resources used by LTL Freight Quotes - Old Dominion Edition
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,916 ▲15413.36 ▼1.378.93 ▲7.2444.04 ▲0.07
Dashboard /wp-admin2,206 ▲325.60 ▼0.0893.54 ▼5.6145.95 ▲4.20
Posts /wp-admin/edit.php2,118 ▲182.15 ▲0.1339.39 ▼1.2835.90 ▼0.15
Add New Post /wp-admin/post-new.php1,543 ▲1723.30 ▼0.05687.48 ▲22.3064.24 ▲16.42
Media Library /wp-admin/upload.php1,417 ▲174.28 ▲0.0697.60 ▼0.0341.69 ▼0.49

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
You still need to fix the following
  • This plugin cannot be uninstalled
    • > 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 has failed, leaving 7 options in the database
    • widget_theysaidso_widget
    • can_compress_scripts
    • odfl_quotes_web_hook_plan_requests
    • db_upgraded
    • widget_recent-comments
    • widget_recent-posts
    • theysaidso_admin_options

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for 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 applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Almost there! Just fix the following items
  • 1× PHP files output text when accessed directly:
    • > /wp-content/plugins/ltl-freight-quotes-odfl-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-odfl-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-odfl-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-odfl-edition/product/en-product-detail.php:23
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/ltl-freight-quotes-odfl-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-odfl-edition/template/csv-export.php:9
    • > PHP Fatal error
      Uncaught Error: Class 'ODFL_Curl_Request' not found in wp-content/plugins/ltl-freight-quotes-odfl-edition/logs/en-logs.php:44

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 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
Attributes that need to be fixed:
  • Tags: Please reduce the number of tags, currently 17 tag instead of maximum 10
You can take inspiration from this readme.txt

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

The main PHP script in "LTL Freight Quotes - Old Dominion Edition" version 4.2.5 is automatically included on every request by WordPress
The following require your attention:
  • Requires at least: Required version must be the same as 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 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
There were no executable files found in this plugin9,952 lines of code in 46 files:
LanguageFilesBlank linesComment linesLines of code
PHP351,0571,1766,245
JavaScript76418772,642
CSS4198471,065

PHP code 50% from 2 tests

This plugin's cyclomatic complexity and code structure detailed below
It is recommended to fix the following
  • Method cyclomatic complexity should be reduced to less than 100 (currently 121)
Cyclomatic complexity
Average complexity per logical line of code0.54
Average class complexity48.10
▷ Minimum class complexity1.00
▷ Maximum class complexity209.00
Average method complexity7.34
▷ Minimum method complexity1.00
▷ Maximum method complexity121.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes21
▷ Abstract classes00.00%
▷ Concrete classes21100.00%
▷ Final classes00.00%
Methods157
▷ Static methods10.64%
▷ Public methods157100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions50
▷ Named functions4896.00%
▷ Anonymous functions24.00%
Constants3
▷ Global constants3100.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
2 PNG files occupy 0.01MB with 0.00MB in potential savings
Potential savings
Compression of 2 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%