78% ltl-freight-quotes-daylight-edition

Code Review | LTL Freight Quotes - Daylight Edition

WordPress plugin LTL Freight Quotes - Daylight Edition scored 78% from 54 tests.

About plugin

  • Plugin page: ltl-freight-quote...
  • Plugin version: 2.2.0
  • PHP version: 7.4.16
  • WordPress compatibility: 6.4-6.3.1
  • WordPress version: 6.3.1
  • First release: Jan 19, 2021
  • Latest release: Sep 5, 2023
  • Number of updates: 21
  • Update frequency: every 46.0 days
  • Top authors: enituretechnology (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 602 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Installer ran successfully

Server metrics [RAM: ▲0.01MB] [CPU: ▼7.15ms] Passed 4 tests

Server-side resources used by LTL Freight Quotes - Daylight Edition
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0149.25 ▲9.32
Dashboard /wp-admin3.31 ▲0.0147.28 ▲0.18
Posts /wp-admin/edit.php3.36 ▲0.0147.82 ▲1.16
Add New Post /wp-admin/post-new.php5.89 ▲0.0185.49 ▼26.49
Media Library /wp-admin/upload.php3.24 ▲0.0128.68 ▼3.45

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for LTL Freight Quotes - Daylight Edition
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,835 ▲10013.25 ▼0.991.96 ▼0.2443.84 ▼0.60
Dashboard /wp-admin2,219 ▲315.85 ▼0.01116.36 ▼2.0542.97 ▼8.12
Posts /wp-admin/edit.php2,102 ▲132.05 ▲0.0636.69 ▼5.9838.29 ▲1.47
Add New Post /wp-admin/post-new.php1,524 ▲1023.38 ▲5.86748.59 ▲143.0877.23 ▲11.38
Media Library /wp-admin/upload.php1,401 ▲134.16 ▼0.03104.26 ▲0.5852.13 ▲8.10

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • This plugin does not fully uninstall, leaving 11 options in the database
    • widget_recent-posts
    • can_compress_scripts
    • theysaidso_admin_options
    • en_daylight_store_type
    • db_upgraded
    • en_daylight_plan_message
    • widget_theysaidso_widget
    • widget_recent-comments
    • en_daylight_plan_number
    • en_daylight_plan_expire_days
    • ...

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 everything seems fine, this is not 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
The following issues need your attention
  • 1× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/ltl-freight-quotes-daylight-edition/admin/tab/logs/en-json-tree-view/en-jtv.php
  • 3× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'EnDaylightCurl\\EnDaylightCurl' not found in wp-content/plugins/ltl-freight-quotes-daylight-edition/admin/tab/logs/en-logs.php:32
    • > PHP Fatal error
      Uncaught Error: Class 'WC_Settings_Page' not found in wp-content/plugins/ltl-freight-quotes-daylight-edition/admin/tab/en-tab.php:13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/ltl-freight-quotes-daylight-edition/en-install.php:13

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser issues were found

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 your attention:
  • Tags: There are too many tags (16 tag instead of maximum 10)
The official readme.txt might help

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

"LTL Freight Quotes - Daylight Edition" version 2.2.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
The following require your attention:
  • Requires at least: The required version number did not match the one declared in readme.txt ("6.2" instead of "6.4")
  • 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 Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
No dangerous file extensions were detected7,006 lines of code in 60 files:
LanguageFilesBlank linesComment linesLines of code
PHP501,0801,4164,959
JavaScript52472351,324
CSS312138706
JSON20017

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.44
Average class complexity17.33
▷ Minimum class complexity1.00
▷ Maximum class complexity108.00
Average method complexity4.53
▷ Minimum method complexity1.00
▷ Maximum method complexity44.00
Code structure
Namespaces35
Interfaces0
Traits0
Classes42
▷ Abstract classes00.00%
▷ Concrete classes42100.00%
▷ Final classes00.00%
Methods195
▷ Static methods9247.18%
▷ Public methods19398.97%
▷ Protected methods00.00%
▷ Private methods21.03%
Functions32
▷ Named functions3093.75%
▷ Anonymous functions26.25%
Constants56
▷ Global constants56100.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
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
admin/tab/location/assets/images/delete.png3.49KB0.86KB▼ 75.41%
admin/tab/location/assets/images/edit.png3.09KB0.70KB▼ 77.43%