73% ltl-freight-quotes-purolator-freight-edition

Code Review | LTL Freight Quotes - Purolator Edition

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

About plugin

  • Plugin page: ltl-freight-quote...
  • Plugin version: 2.1.3
  • PHP version: 7.4.16
  • WordPress compatibility: 6.4-6.3
  • WordPress version: 6.3.1
  • First release: Jun 8, 2017
  • Latest release: Sep 12, 2023
  • Number of updates: 20
  • Update frequency: every 114.7 days
  • Top authors: enituretechnology (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,236 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▼0.84MB] [CPU: ▼34.54ms] Passed 4 tests

A check of server-side resources used by LTL Freight Quotes - Purolator Edition
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.72 ▲0.2635.97 ▼5.22
Dashboard /wp-admin3.10 ▼0.2023.73 ▼22.27
Posts /wp-admin/edit.php3.10 ▼0.2522.16 ▼25.76
Add New Post /wp-admin/post-new.php3.10 ▼2.7825.47 ▼74.56
Media Library /wp-admin/upload.php3.10 ▼0.1322.17 ▼15.58

Server storage [IO: ▲0.45MB] [DB: ▲0.07MB] Passed 3 tests

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for LTL Freight Quotes - Purolator Edition
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,819 ▲7313.25 ▼1.103.81 ▲2.2337.66 ▼1.65
Dashboard /wp-admin2,225 ▲505.65 ▲0.0784.21 ▼17.7142.40 ▼3.03
Posts /wp-admin/edit.php2,131 ▲282.31 ▲0.3239.76 ▼2.4536.97 ▼1.04
Add New Post /wp-admin/post-new.php1,556 ▲2823.23 ▲0.10667.76 ▼15.7637.02 ▼17.18
Media Library /wp-admin/upload.php1,427 ▲244.31 ▲0.0897.13 ▼2.0643.42 ▼1.70

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended 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
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-posts
    • purolator_ltl_quotes_web_hook_plan_requests
    • widget_recent-comments
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please take a closer look at the following
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/ltl-freight-quotes-purolator-freight-edition/template/csv-export.php:9

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

Optimizations

Plugin configuration 86% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
Attributes that require attention:
  • Tags: There are too many tags (18 tag instead of maximum 10)
You can take inspiration from this readme.txt

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

Analyzing the main PHP file in "LTL Freight Quotes - Purolator Edition" version 2.1.3
Please take the time to fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("ltl-freight-quotes-purolator-freight-edition.php" instead of "ltl-freight-quotes-purolator-edition.php")
  • 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: Required version must be the same as 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 | Executable files are considered dangerous and should not be included with any WordPress plugin
No dangerous file extensions were detected5,928 lines of code in 32 files:
LanguageFilesBlank linesComment linesLines of code
PHP276308224,047
JavaScript32983821,182
CSS26539699

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.47
Average class complexity29.71
▷ Minimum class complexity1.00
▷ Maximum class complexity83.00
Average method complexity5.73
▷ Minimum method complexity1.00
▷ Maximum method complexity63.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes14
▷ Abstract classes00.00%
▷ Concrete classes14100.00%
▷ Final classes00.00%
Methods85
▷ Static methods00.00%
▷ Public methods85100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions48
▷ Named functions48100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.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
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
warehouse-dropship/wild/assets/images/edit.png3.09KB0.70KB▼ 77.43%
asset/edit.png3.09KB0.70KB▼ 77.43%
asset/delete.png3.49KB0.86KB▼ 75.41%
warehouse-dropship/wild/assets/images/delete.png3.49KB0.86KB▼ 75.41%