77% ltl-freight-quotes-tql-edition

Code Review | LTL Freight Quotes - TQL Edition

WordPress plugin LTL Freight Quotes - TQL Edition scored77%from 54 tests.

About plugin

  • Plugin page: ltl-freight-quote...
  • Plugin version: 1.2.0
  • PHP version: 7.4.16
  • WordPress compatibility: 6.4-6.4.1
  • WordPress version: 6.3.1
  • First release: Oct 11, 2021
  • Latest release: Nov 20, 2023
  • Number of updates: 21
  • Update frequency: every 36.9 days
  • Top authors: enituretechnology (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /636 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.08MB] [CPU: ▼5.11ms] Passed 4 tests

This is a short check of server-side resources used by LTL Freight Quotes - TQL Edition
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.56 ▲0.0937.34 ▼2.42
Dashboard /wp-admin3.39 ▲0.0545.91 ▼15.99
Posts /wp-admin/edit.php3.51 ▲0.1547.60 ▲2.42
Add New Post /wp-admin/post-new.php5.97 ▲0.0991.22 ▼2.81
Media Library /wp-admin/upload.php3.32 ▲0.0933.94 ▲0.78

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

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

Browser metrics Passed 4 tests

LTL Freight Quotes - TQL Edition: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲3814.63 ▲0.391.67 ▼0.0838.55 ▼4.48
Dashboard /wp-admin2,205 ▲285.61 ▼0.0191.77 ▲0.5042.12 ▼2.41
Posts /wp-admin/edit.php2,111 ▲112.03 ▼0.1139.57 ▼2.2936.84 ▼0.95
Add New Post /wp-admin/post-new.php1,545 ▲1925.24 ▲2.02621.29 ▼50.6861.62 ▲13.61
Media Library /wp-admin/upload.php1,410 ▲104.25 ▲0.1097.36 ▼2.0242.75 ▼2.25

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-posts
    • can_compress_scripts
    • db_upgraded
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-comments

Smoke tests 50% 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)
Even though no errors were found, this is by no means 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
The following issues need your attention
  • 1× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/ltl-freight-quotes-tql-edition/admin/tab/logs/en-json-tree-view/en-jtv.php
  • 3× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/ltl-freight-quotes-tql-edition/en-install.php:12
    • > PHP Fatal error
      Uncaught Error: Class 'EnTqlCurl\\EnTqlCurl' not found in wp-content/plugins/ltl-freight-quotes-tql-edition/admin/tab/logs/en-logs.php:39
    • > PHP Fatal error
      Uncaught Error: Class 'WC_Settings_Page' not found in wp-content/plugins/ltl-freight-quotes-tql-edition/admin/tab/en-tab.php:14

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 90% 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: Please reduce the number of tags, currently 16 tag instead of maximum 10
The official readme.txt might help

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

"LTL Freight Quotes - TQL Edition" version 1.2.0's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
The following require your attention:
  • 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 Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Success! There were no dangerous files found in this plugin7,350 lines of code in 61 files:
LanguageFilesBlank linesComment linesLines of code
PHP511,0121,5315,261
JavaScript52512441,371
CSS312138701
JSON20017

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.45
Average class complexity17.70
▷ Minimum class complexity1.00
▷ Maximum class complexity114.00
Average method complexity4.61
▷ Minimum method complexity1.00
▷ Maximum method complexity46.00
Code structure
Namespaces37
Interfaces0
Traits0
Classes44
▷ Abstract classes00.00%
▷ Concrete classes44100.00%
▷ Final classes00.00%
Methods204
▷ Static methods10049.02%
▷ Public methods20198.53%
▷ Protected methods00.00%
▷ Private methods31.47%
Functions32
▷ Named functions2990.62%
▷ Anonymous functions39.38%
Constants56
▷ Global constants56100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 0% from 2 tests

Image compression 0% from 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
74 PNG files occupy 0.64MB with 0.36MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
admin/tab/carriers/assets/rlca.png2.98KB2.07KB▼ 30.55%
(invalid) admin/tab/carriers/assets/EQXT.png7.94KB0.00KB▼ 100.00%
admin/tab/carriers/assets/smtl.png10.44KB4.67KB▼ 55.30%
admin/tab/carriers/assets/ulrd.png7.43KB3.99KB▼ 46.30%
admin/tab/carriers/assets/rblt.png6.40KB2.97KB▼ 53.50%