63% ltl-freight-quotes-freightquote-edition

Code Review | LTL Freight Quotes - FreightQuote Edition

WordPress plugin LTL Freight Quotes - FreightQuote Edition scored63%from 54 tests.

About plugin

  • Plugin page: ltl-freight-quote...
  • Plugin version: 2.2.7
  • PHP version: 7.4.16
  • WordPress compatibility: 5.7-6.2.2
  • WordPress version: 6.3.1
  • First release: Aug 27, 2019
  • Latest release: Jul 25, 2023
  • Number of updates: 37
  • Update frequency: every 38.6 days
  • Top authors: enituretechnology (100%)

Code review

54 tests

User reviews

1 review

Install metrics

30+ active /2,516 total downloads

Benchmarks

Plugin footprint 48% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
This plugin's installer ran successfully

Server metrics [RAM: ▲0.15MB] [CPU: ▼23.00ms] Passed 4 tests

Server-side resources used by LTL Freight Quotes - FreightQuote Edition
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /4.70 ▲1.2344.87 ▲3.75
Dashboard /wp-admin4.11 ▲0.7631.84 ▼25.92
Posts /wp-admin/edit.php4.11 ▲0.7534.51 ▼11.54
Add New Post /wp-admin/post-new.php4.11 ▼1.7832.63 ▼57.12
Media Library /wp-admin/upload.php4.11 ▲0.8838.74 ▲2.59

Server storage [IO: ▲1.69MB] [DB: ▲0.01MB] Passed 3 tests

A short overview of filesystem and database impact
The plugin installed successfully
Filesystem: 137 new files
Database: 2 new tables, 16 new options
New tables
wp_warehouse
wp_freightQuote_carriers
New WordPress options
freightquote_ltl_packages_quotes_package
en_orders_ids_flag
db_upgraded
en_async_orders_exporting_process
can_compress_scripts
freightquote_ltl_package_expire_days
theysaidso_admin_options
widget_theysaidso_widget
freightquote_quests_store_type
eniture_plugin_20
...

Browser metrics Passed 4 tests

Checking browser requirements for LTL Freight Quotes - FreightQuote Edition
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,946 ▲21113.70 ▼0.596.35 ▲4.3338.92 ▼13.89
Dashboard /wp-admin2,243 ▲555.25 ▲0.12114.21 ▼3.3544.33 ▼0.83
Posts /wp-admin/edit.php2,129 ▲402.45 ▲0.4443.67 ▲7.5936.08 ▼0.88
Add New Post /wp-admin/post-new.php1,551 ▲3723.16 ▲5.40670.64 ▼18.9837.19 ▼27.68
Media Library /wp-admin/upload.php1,422 ▲344.42 ▲0.20103.04 ▼11.1142.62 ▼7.37

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
The following 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
  • The uninstall procedure failed, leaving 2 tables in the database
    • wp_freightQuote_carriers
    • wp_warehouse
  • The uninstall procedure has failed, leaving 11 options in the database
    • theysaidso_admin_options
    • widget_recent-comments
    • db_upgraded
    • en_freight_quote_truckload_weight_threshold_chr
    • widget_recent-posts
    • en_freight_quote_truckload_weight_threshold
    • en_async_orders_exporting_process
    • widget_theysaidso_widget
    • can_compress_scripts
    • en_orders_ids_flag
    • ...

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
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
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-freightquote-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-freightquote-edition/template/csv-export.php:9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/ltl-freight-quotes-freightquote-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-freightquote-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-freightquote-edition/order/rates/order-rates.php:13

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 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
These attributes need to be fixed:
  • Tags: Too many tags (17 tag instead of maximum 10); only the first 5 tags are used in your directory listing
The official readme.txt might help

ltl-freight-quotes-freightquote-edition/ltl-freight-quotes-freightquote-edition.php 92% from 13 tests

The main file in "LTL Freight Quotes - FreightQuote Edition" v. 2.2.7 serves as a complement to information provided in readme.txt and as the entry point to the plugin
Please make the necessary changes and fix the following:
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
There were no executable files found in this plugin9,763 lines of code in 41 files:
LanguageFilesBlank linesComment linesLines of code
PHP321,0541,1946,684
JavaScript54366362,100
CSS317940970
SVG1009

PHP code 50% from 2 tests

An overview of cyclomatic complexity and code structure
The following items need your attention
  • Method cyclomatic complexity should be reduced to less than 100 (currently 121)
Cyclomatic complexity
Average complexity per logical line of code0.51
Average class complexity48.70
▷ Minimum class complexity3.00
▷ Maximum class complexity240.00
Average method complexity7.12
▷ Minimum method complexity1.00
▷ Maximum method complexity121.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes20
▷ Abstract classes00.00%
▷ Concrete classes20100.00%
▷ Final classes00.00%
Methods156
▷ Static methods10.64%
▷ Public methods156100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions43
▷ Named functions4297.67%
▷ Anonymous functions12.33%
Constants5
▷ Global constants5100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
88 PNG files occupy 1.04MB with 0.61MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
Carrier_Logos/atlanta-consolidated.png3.21KB1.85KB▼ 42.39%
Carrier_Logos/xgs1.png23.86KB9.17KB▼ 61.56%
Carrier_Logos/pmli.png3.75KB1.39KB▼ 63.03%
Carrier_Logos/dhrn.png10.03KB3.60KB▼ 64.13%
Carrier_Logos/saia.png11.59KB4.35KB▼ 62.42%