77% ltl-freight-quotes-freightview-edition

Code Review | LTL Freight Quotes - Freightview Edition

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

About plugin

  • Plugin page: ltl-freight-quote...
  • Plugin version: 1.1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 6.4-6.4.1
  • WordPress version: 6.3.1
  • First release: Oct 21, 2022
  • Latest release: Dec 1, 2023
  • Number of updates: 13
  • Update frequency: every 32.3 days
  • Top authors: enituretechnology (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /420 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.09MB] [CPU: ▼3.93ms] Passed 4 tests

An overview of server-side resources used by LTL Freight Quotes - Freightview Edition
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.56 ▲0.1037.87 ▼6.05
Dashboard /wp-admin3.40 ▲0.0955.02 ▼3.16
Posts /wp-admin/edit.php3.51 ▲0.1548.42 ▼1.42
Add New Post /wp-admin/post-new.php5.98 ▲0.0988.81 ▼5.09
Media Library /wp-admin/upload.php3.32 ▲0.0935.48 ▲2.23

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

Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 147 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
can_compress_scripts
db_upgraded
widget_recent-comments
widget_theysaidso_widget
widget_recent-posts

Browser metrics Passed 4 tests

LTL Freight Quotes - Freightview Edition: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲3814.67 ▲0.261.64 ▼0.0236.22 ▼7.29
Dashboard /wp-admin2,196 ▲225.62 ▲0.0193.25 ▼1.0844.99 ▼2.02
Posts /wp-admin/edit.php2,111 ▲111.96 ▲0.0035.90 ▼4.5432.10 ▼3.95
Add New Post /wp-admin/post-new.php1,536 ▲1023.44 ▲0.42684.01 ▲64.4856.74 ▼2.70
Media Library /wp-admin/upload.php1,413 ▲134.27 ▲0.1296.03 ▼1.6142.34 ▲0.34

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
Please fix the following items
  • The uninstall procedure has failed, leaving 11 options in the database
    • widget_theysaidso_widget
    • en_daylight_plan_expire_date
    • db_upgraded
    • can_compress_scripts
    • en_daylight_store_type
    • theysaidso_admin_options
    • en_daylight_plan_number
    • en_daylight_plan_expire_days
    • widget_recent-posts
    • en_freightview_plan_message
    • ...

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
Everything seems fine, however this is by no means an exhaustive test

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 take a closer look at the following
  • 1× PHP files output text when accessed directly:
    • > /wp-content/plugins/ltl-freight-quotes-freightview-edition/admin/tab/logs/en-json-tree-view/en-jtv.php
  • 4× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/ltl-freight-quotes-freightview-edition/admin/tab/logs/en-logs.php:34
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/ltl-freight-quotes-freightview-edition/en-install.php:13
    • > PHP Warning
      Use of undefined constant EN_FREIGHTVIEW_SERVER_NAME - assumed 'EN_FREIGHTVIEW_SERVER_NAME' (this will throw an Error in a future version of PHP) in wp-content/plugins/ltl-freight-quotes-freightview-edition/admin/tab/logs/en-logs.php on line 33
    • > PHP Fatal error
      Uncaught Error: Class 'WC_Settings_Page' not found in wp-content/plugins/ltl-freight-quotes-freightview-edition/admin/tab/en-tab.php:14

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 90% 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 need to be fixed:
  • Tags: You are using too many tags: 16 tag instead of maximum 10
The official readme.txt might help

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

This is the main PHP file of "LTL Freight Quotes - Freightview Edition" version 1.1.1, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
You should first fix the following items:
  • Text Domain: If you choose to specify the text domain, it must be the same as the plugin slug; 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 | This is a short overview of programming languages used in this plugin, detecting executable files
There were no executable files found in this plugin7,764 lines of code in 63 files:
LanguageFilesBlank linesComment linesLines of code
PHP511,0461,4975,539
JavaScript62632451,474
CSS412836734
JSON20017

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.45
Average class complexity18.72
▷ Minimum class complexity1.00
▷ Maximum class complexity122.00
Average method complexity4.69
▷ Minimum method complexity1.00
▷ Maximum method complexity58.00
Code structure
Namespaces35
Interfaces0
Traits0
Classes43
▷ Abstract classes00.00%
▷ Concrete classes43100.00%
▷ Final classes00.00%
Methods207
▷ Static methods10249.28%
▷ Public methods20498.55%
▷ Protected methods00.00%
▷ Private methods31.45%
Functions28
▷ Named functions2589.29%
▷ Anonymous functions310.71%
Constants61
▷ Global constants61100.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
77 PNG files occupy 0.64MB with 0.30MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
admin/tab/carriers/assets/zip-xpress.png1.57KB1.57KB0.06%
admin/tab/carriers/assets/xpo-logistics.png8.63KB3.13KB▼ 63.75%
admin/tab/location/assets/images/edit.png3.09KB0.70KB▼ 77.43%
admin/tab/carriers/assets/nemf.png5.78KB2.88KB▼ 50.14%
admin/tab/carriers/assets/btnb.png11.25KB5.99KB▼ 46.77%