67% ltl-freight-quotes-rl-edition

Code Review | LTL Freight Quotes - R+L Carriers Edition

WordPress plugin LTL Freight Quotes - R+L Carriers Edition scored67%from 54 tests.

About plugin

  • Plugin page: ltl-freight-quote...
  • Plugin version: 3.2.4
  • PHP version: 7.4.16
  • WordPress compatibility: 6.4-6.4
  • WordPress version: 6.3.1
  • First release: May 15, 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

1 review

Install metrics

10+ active /2,430 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully

Server metrics [RAM: ▼0.86MB] [CPU: ▼37.16ms] Passed 4 tests

Analyzing server-side resources used by LTL Freight Quotes - R+L Carriers Edition
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.55 ▲0.0836.81 ▼3.33
Dashboard /wp-admin3.10 ▼0.2524.91 ▼38.62
Posts /wp-admin/edit.php3.10 ▼0.2623.25 ▼26.48
Add New Post /wp-admin/post-new.php3.10 ▼2.7925.08 ▼73.06
Media Library /wp-admin/upload.php3.10 ▼0.1322.81 ▼10.48

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

A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 58 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_recent-comments
can_compress_scripts
widget_recent-posts
widget_theysaidso_widget
theysaidso_admin_options

Browser metrics Passed 4 tests

A check of browser resources used by LTL Freight Quotes - R+L Carriers Edition
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,891 ▲14413.39 ▼0.938.11 ▲6.3636.62 ▼6.55
Dashboard /wp-admin2,206 ▲265.54 ▼0.1493.24 ▼6.4442.82 ▼2.51
Posts /wp-admin/edit.php2,121 ▲212.13 ▲0.1242.59 ▼0.3938.91 ▼0.06
Add New Post /wp-admin/post-new.php1,543 ▲1423.19 ▼0.02631.04 ▲18.8450.51 ▼13.90
Media Library /wp-admin/upload.php1,417 ▲174.17 ▼0.0794.69 ▼1.0246.08 ▲5.13

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
  • 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
  • Zombie WordPress options detected upon uninstall: 7 options
    • rnl_quotes_web_hook_plan_requests
    • widget_recent-posts
    • db_upgraded
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • can_compress_scripts

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
The smoke test was a success, however most plugin functionality was not tested

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
Please fix the following
  • 1× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/ltl-freight-quotes-rl-edition/logs/en-json-tree-view/en-jtv.php
  • 6× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/ltl-freight-quotes-rl-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-rl-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-rl-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-rl-edition/order/rates/order-rates.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'RNL_Curl_Request' not found in wp-content/plugins/ltl-freight-quotes-rl-edition/logs/en-logs.php:44
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/ltl-freight-quotes-rl-edition/template/csv-export.php:9

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side

Optimizations

Plugin configuration 86% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
Attributes that require attention:
  • Tags: Too many tags (16 tag instead of maximum 10); only the first 5 tags are used in your directory listing
Please take inspiration from this readme.txt

ltl-freight-quotes-rl-edition/ltl-freight-quotes-rnl-edition.php 77% from 13 tests

The principal PHP file in "LTL Freight Quotes - R+L Carriers Edition" v. 3.2.4 is loaded by WordPress automatically on each request
The following require your attention:
  • Text Domain: The text domain is optional since WordPress version 4.6; if you do specify it, it must be the same as the plugin slug
  • Requires at least: Required version does not match the one declared in readme.txt ("6.2" instead of "6.4")
  • Main file name: The principal plugin file should be the same as the plugin slug ("ltl-freight-quotes-rl-edition.php" instead of "ltl-freight-quotes-rnl-edition.php")

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Good job! No executable or dangerous file extensions detected9,619 lines of code in 45 files:
LanguageFilesBlank linesComment linesLines of code
PHP351,0981,2076,442
JavaScript64446292,106
CSS4184451,071

PHP code 50% from 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
These items need your attention
  • Cyclomatic complexity of methods should be reduced to less than 100 (currently 151)
Cyclomatic complexity
Average complexity per logical line of code0.53
Average class complexity49.67
▷ Minimum class complexity1.00
▷ Maximum class complexity251.00
Average method complexity7.43
▷ Minimum method complexity1.00
▷ Maximum method complexity151.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes21
▷ Abstract classes00.00%
▷ Concrete classes21100.00%
▷ Final classes00.00%
Methods159
▷ Static methods10.63%
▷ Public methods159100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions48
▷ Named functions4797.92%
▷ Anonymous functions12.08%
Constants4
▷ Global constants4100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
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/delete.png3.49KB0.86KB▼ 75.41%
warehouse-dropship/wild/assets/images/edit.png3.09KB0.70KB▼ 77.43%
asset/delete.png3.49KB0.86KB▼ 75.41%