67% ltl-freight-quotes-abf-freight-edition

Code Review | LTL Freight Quotes - ABF Freight Edition

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

About plugin

  • Plugin page: ltl-freight-quote...
  • Plugin version: 3.2.1
  • PHP version: 7.4.16
  • WordPress compatibility: 6.4-6.3
  • WordPress version: 6.3.1
  • First release: May 11, 2017
  • Latest release: Aug 10, 2023
  • Number of updates: 66
  • Update frequency: every 34.7 days
  • Top authors: enituretechnology (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active /2,740 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
This plugin's installer ran successfully

Server metrics [RAM: ▲0.12MB] [CPU: ▼25.38ms] Passed 4 tests

An overview of server-side resources used by LTL Freight Quotes - ABF Freight Edition
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /4.64 ▲1.1846.03 ▲6.44
Dashboard /wp-admin4.07 ▲0.7634.64 ▼17.58
Posts /wp-admin/edit.php4.07 ▲0.7136.51 ▼10.58
Add New Post /wp-admin/post-new.php4.07 ▼1.8238.05 ▼69.20
Media Library /wp-admin/upload.php4.07 ▲0.8334.60 ▼4.16

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for LTL Freight Quotes - ABF Freight Edition
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,969 ▲19813.84 ▼0.446.14 ▲3.9441.59 ▼2.72
Dashboard /wp-admin2,269 ▲925.05 ▼0.86116.85 ▼11.3344.71 ▼3.74
Posts /wp-admin/edit.php2,152 ▲632.23 ▲0.1745.02 ▲6.3347.72 ▲10.65
Add New Post /wp-admin/post-new.php1,423 ▼11021.15 ▼2.14578.89 ▼110.4142.87 ▼13.18
Media Library /wp-admin/upload.php1,442 ▲544.36 ▲0.09125.23 ▲13.8253.74 ▲8.73

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
The following items require your attention
  • This plugin did not uninstall without warnings or errors
    • > 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 10 options in the database
    • widget_theysaidso_widget
    • db_upgraded
    • can_compress_scripts
    • en_async_orders_exporting_process
    • widget_recent-comments
    • abf_quotes_web_hook_plan_requests
    • en_orders_ids
    • widget_recent-posts
    • theysaidso_admin_options
    • en_orders_ids_flag

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Good news, no errors were detected

SRP 0% 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
The following issues need your attention
  • 1× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/ltl-freight-quotes-abf-freight-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_filter() in wp-content/plugins/ltl-freight-quotes-abf-freight-edition/product/en-product-detail.php:23
    • > PHP Fatal error
      Uncaught Error: Class 'ABF_Curl_Request' not found in wp-content/plugins/ltl-freight-quotes-abf-freight-edition/logs/en-logs.php:42
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/ltl-freight-quotes-abf-freight-edition/template/csv-export.php:9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/ltl-freight-quotes-abf-freight-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-abf-freight-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-abf-freight-edition/order/rates/order-rates.php:13

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There were no browser issues found

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 need to be fixed:
  • Tags: You are using too many tags: 16 tag instead of maximum 10
You can look at the official readme.txt

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

"LTL Freight Quotes - ABF Freight Edition" version 3.2.1's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
Please make the necessary changes and fix the following:
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6
  • 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 | Executable files are considered dangerous and should not be included with any WordPress plugin
Everything looks great! No dangerous files found in this plugin10,234 lines of code in 49 files:
LanguageFilesBlank linesComment linesLines of code
PHP381,1061,2596,271
JavaScript75027082,509
CSS4283581,454

PHP code 50% from 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
These items need your attention
  • Method cyclomatic complexity has to be reduced to less than 100 (currently 128)
Cyclomatic complexity
Average complexity per logical line of code0.51
Average class complexity44.13
▷ Minimum class complexity1.00
▷ Maximum class complexity219.00
Average method complexity6.80
▷ Minimum method complexity1.00
▷ Maximum method complexity128.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes23
▷ Abstract classes00.00%
▷ Concrete classes23100.00%
▷ Final classes00.00%
Methods171
▷ Static methods10.58%
▷ Public methods171100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions45
▷ Named functions45100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and 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
asset/edit.png3.09KB0.70KB▼ 77.43%
warehouse-dropship/wild/assets/images/edit.png3.09KB0.70KB▼ 77.43%
asset/delete.png3.49KB0.86KB▼ 75.41%
warehouse-dropship/wild/assets/images/delete.png3.49KB0.86KB▼ 75.41%