73% ltl-freight-quotes-yrc-edition

Code Review | LTL Freight Quotes - YRC Edition

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

About plugin

  • Plugin page: ltl-freight-quote...
  • Plugin version: 3.1.8
  • PHP version: 7.4.16
  • WordPress compatibility: 5.7-6.1.1
  • WordPress version: 6.3.1
  • First release: Apr 26, 2017
  • Latest release: Mar 24, 2023
  • Number of updates: 53
  • Update frequency: every 40.7 days
  • Top authors: enituretechnology (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active /2,624 total downloads


Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed gracefully, with no errors

Server metrics [RAM: ▼0.91MB] [CPU: ▼32.50ms] Passed 4 tests

This is a short check of server-side resources used by LTL Freight Quotes - YRC Edition
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0241.82 ▲0.28
Dashboard /wp-admin3.03 ▼0.2722.61 ▼29.56
Posts /wp-admin/edit.php3.03 ▼0.3223.45 ▼23.07
Add New Post /wp-admin/post-new.php3.03 ▼2.8523.36 ▼66.24
Media Library /wp-admin/upload.php3.03 ▼0.1922.18 ▼11.14

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

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 49 new files
Database: no new tables, 6 new options
New WordPress options

Browser metrics Passed 4 tests

An overview of browser requirements for LTL Freight Quotes - YRC Edition
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,923 ▲17713.72 ▼0.655.95 ▲4.1342.97 ▼3.42
Dashboard /wp-admin2,217 ▲326.01 ▲1.1298.50 ▼18.7639.55 ▼7.02
Posts /wp-admin/edit.php2,103 ▲142.06 ▲0.0734.58 ▼3.8337.48 ▲1.83
Add New Post /wp-admin/post-new.php1,542 ▲922.78 ▼0.25675.11 ▲14.1553.97 ▲1.95
Media Library /wp-admin/upload.php1,402 ▲144.35 ▲0.1798.02 ▼0.4043.18 ▼0.55

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
You still need to fix the following
  • Uninstall procedure had uncaught errors
    • > Warning in wp-admin/includes/plugin.php+294
    opendir(wp-content/plugins/woocommerce): failed to open dir: No such file or directory
  • Zombie WordPress options detected upon uninstall: 7 options
    • widget_recent-comments
    • yrc_quotes_web_hook_plan_requests
    • widget_recent-posts
    • widget_theysaidso_widget
    • db_upgraded
    • can_compress_scripts
    • theysaidso_admin_options

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 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please take a closer look at the following
  • 5× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/ltl-freight-quotes-yrc-edition/template/csv-export.php:9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/ltl-freight-quotes-yrc-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-yrc-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-yrc-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-yrc-edition/order/rates/order-rates.php:13

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser issues were found


Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
These attributes need to be fixed:
  • Tags: You are using too many tags: 16 tag instead of maximum 10
The official readme.txt is a good inspiration

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

This is the main PHP file of "LTL Freight Quotes - YRC Edition" version 3.1.8, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
It is important to fix the following:
  • 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 | There should be no dangerous file extensions present in any WordPress plugin
Good job! No executable or dangerous file extensions detected7,825 lines of code in 40 files:
LanguageFilesBlank linesComment linesLines of code

PHP code 50% from 2 tests

An overview of cyclomatic complexity and code structure
It is recommended to fix the following
  • Please reduce cyclomatic complexity of methods to less than 100 (currently 108)
Cyclomatic complexity
Average complexity per logical line of code0.54
Average class complexity45.05
▷ Minimum class complexity1.00
▷ Maximum class complexity185.00
Average method complexity6.98
▷ Minimum method complexity1.00
▷ Maximum method complexity108.00
Code structure
▷ Abstract classes00.00%
▷ Concrete classes19100.00%
▷ Final classes00.00%
▷ Static methods10.71%
▷ Public methods140100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
▷ Named functions42100.00%
▷ Anonymous functions00.00%
▷ Global constants4100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
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%