10% ltl-freight-quotes-cerasis-edition

Code Review | LTL Freight Quotes - Cerasis Edition

WordPress plugin LTL Freight Quotes - Cerasis Edition scored 10% from 54 tests.

About plugin

  • Plugin page: ltl-freight-quote...
  • Plugin version: 2.0.6
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.0-5.4
  • WordPress version: 5.9.2
  • First release: Jan 15, 2018
  • Latest release: Apr 6, 2020
  • Number of updates: 18
  • Update frequency: every 45.3 days
  • Top authors: enituretechnology (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 758 total downloads

Benchmarks

Plugin footprint 23% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Please fix the following installer errors
  • The plugin cannot be installed
    • > Notice in wp-content/plugins/ltl-freight-quotes-cerasis-edition/update-plan.php+48
    Undefined index: expiry_date

Server metrics [RAM: ▼0.52MB] [CPU: ▼317.02ms] Passed 4 tests

An overview of server-side resources used by LTL Freight Quotes - Cerasis Edition
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /4.23 ▲0.7162.47 ▲12.11
Dashboard /wp-admin3.81 ▲0.4022.90 ▼13.07
Posts /wp-admin/edit.php3.81 ▲0.1623.21 ▼15.51
Add New Post /wp-admin/post-new.php3.81 ▼3.1721.82 ▼1,251.59
Media Library /wp-admin/upload.php3.81 ▲0.5171.16 ▲46.63

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

Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 79 new files
Database: 2 new tables, 12 new options
New tables
wp_carriers
wp_warehouse
New WordPress options
en_old_user_hazmat_status
en_old_user_dropship_status
en_old_user_warehouse_status
wc_cerasis_edition
en_cerasis_update_now
cerasis_freight_quotes_store_type
cerasis_freight_package
cerasis_freight_package_expire_date
eniture_plugin_15
wc_cerasis_db_version
...

Browser metrics Passed 4 tests

LTL Freight Quotes - Cerasis Edition: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,954 ▲20016.92 ▲1.0112.49 ▲6.472.77 ▲0.05
Dashboard /wp-admin2,972 ▲1116.49 ▲0.26114.45 ▼32.21145.39 ▼16.54
Posts /wp-admin/edit.php2,765 ▲712.95 ▼0.2866.12 ▲3.13142.52 ▼3.54
Add New Post /wp-admin/post-new.php1,649 ▼2322.66 ▲1.08324.70 ▼120.82150.53 ▼13.03
Media Library /wp-admin/upload.php1,780 ▲825.95 ▲0.50123.46 ▼25.75161.13 ▼27.11

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • This plugin cannot be uninstalled
    • > Warning in wp-admin/includes/plugin.php+290
    opendir(wp-content/plugins/woocommerce): failed to open dir: No such file or directory
  • This plugin does not fully uninstall, leaving 2 tables in the database
    • wp_warehouse
    • wp_carriers
  • The uninstall procedure has failed, leaving 7 options in the database
    • en_old_user_dropship_status
    • cerasis_freights_web_hook_plan_requests
    • wc_cerasis_db_version
    • en_old_user_warehouse_status
    • EN_Plugins
    • en_old_user_hazmat_status
    • en_cerasis_update_now

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

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
The following issues need your attention
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/ltl-freight-quotes-cerasis-edition/orders/assets/js/admin_order.php:4

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)
You can take inspiration from this readme.txt

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

The main file in "LTL Freight Quotes - Cerasis Edition" v. 2.0.6 serves as a complement to information provided in readme.txt and as the entry point to the plugin
Please make the necessary changes and fix the following:
  • Requires at least: Required version must match the one declared in readme.txt ("4.0" instead of "3.0.0")
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Everything looks great! No dangerous files found in this plugin6,796 lines of code in 43 files:
LanguageFilesBlank linesComment linesLines of code
PHP379601,1304,969
JavaScript3271363977
CSS37234850

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.48
Average class complexity20.23
▷ Minimum class complexity1.00
▷ Maximum class complexity113.00
Average method complexity4.39
▷ Minimum method complexity1.00
▷ Maximum method complexity65.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes26
▷ Abstract classes00.00%
▷ Concrete classes26100.00%
▷ Final classes00.00%
Methods147
▷ Static methods21.36%
▷ Public methods147100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions38
▷ Named functions3797.37%
▷ Anonymous functions12.63%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
30 PNG files occupy 0.26MB with 0.17MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
includes/warehouse-dropship/wild/assets/images/edit.png3.09KB0.70KB▼ 77.43%
assets/carrier-logos/midw.png8.52KB2.97KB▼ 65.10%
assets/carrier-logos/sefl.png7.90KB3.29KB▼ 58.30%
assets/carrier-logos/chrobinson.png12.52KB3.83KB▼ 69.40%
assets/carrier-logos/dhrn.png10.03KB3.60KB▼ 64.13%