73% small-package-quotes-purolator-edition

Code Review | Small Package Quotes - Purolator Edition

WordPress plugin Small Package Quotes - Purolator Edition scored73%from 54 tests.

About plugin

  • Plugin page: small-package-quo...
  • Plugin version: 3.5.1
  • PHP version: 7.4.16
  • WordPress compatibility: 6.4-6.3
  • WordPress version: 6.3.1
  • First release: Aug 23, 2017
  • Latest release: Aug 15, 2023
  • Number of updates: 46
  • Update frequency: every 47.6 days
  • Top authors: enituretechnology (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,775 total downloads

Benchmarks

Plugin footprint 65% 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.03MB] [CPU: ▼29.35ms] Passed 4 tests

An overview of server-side resources used by Small Package Quotes - Purolator Edition
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /4.50 ▲1.0452.13 ▲9.03
Dashboard /wp-admin3.92 ▲0.5834.85 ▼30.52
Posts /wp-admin/edit.php3.93 ▲0.5731.14 ▼23.34
Add New Post /wp-admin/post-new.php3.92 ▼1.9634.86 ▼65.53
Media Library /wp-admin/upload.php3.93 ▲0.7033.64 ▲1.98

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

Analyzing filesystem and database footprints of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 53 new files
Database: no new tables, 9 new options
New WordPress options
theysaidso_admin_options
widget_recent-posts
widget_recent-comments
en_orders_ids
widget_theysaidso_widget
can_compress_scripts
en_orders_ids_flag
db_upgraded
en_async_orders_exporting_process

Browser metrics Passed 4 tests

A check of browser resources used by Small Package Quotes - Purolator Edition
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,928 ▲14213.48 ▼1.1710.34 ▲8.2942.66 ▼3.43
Dashboard /wp-admin2,222 ▲485.84 ▲0.2392.65 ▼15.7741.25 ▼6.29
Posts /wp-admin/edit.php2,131 ▲312.35 ▲0.3838.31 ▲0.2333.59 ▼0.05
Add New Post /wp-admin/post-new.php1,556 ▲2823.55 ▲0.51597.00 ▼74.1559.01 ▲6.62
Media Library /wp-admin/upload.php1,433 ▲394.45 ▲0.28101.66 ▼0.0243.69 ▼1.87

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
  • The plugin did not uninstall gracefully
    • > 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: 10 options
    • widget_recent-comments
    • en_orders_ids_flag
    • en_async_orders_exporting_process
    • theysaidso_admin_options
    • widget_recent-posts
    • purolator_small_web_hook_plan_requests
    • en_orders_ids
    • can_compress_scripts
    • db_upgraded
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Good news, no errors were detected

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
Please fix the following
  • 5× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/small-package-quotes-purolator-edition/order-details/en-order-export.php:14
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/small-package-quotes-purolator-edition/order-details/en-order-widget.php:16
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/small-package-quotes-purolator-edition/order-details/rates/order-rates.php:13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/small-package-quotes-purolator-edition/product/en-product-detail.php:23
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/small-package-quotes-purolator-edition/template/csv-export.php:9

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
No browser errors were detected

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
These attributes need to be fixed:
  • Tags: You are using too many tags: 14 tag instead of maximum 10
You can take inspiration from this readme.txt

small-package-quotes-purolator-edition/small-package-quotes-purolator-edition.php 85% from 13 tests

The primary PHP file in "Small Package Quotes - Purolator Edition" version 3.5.1 is used by WordPress to initiate all plugin functionality
Please take the time to fix the following:
  • Requires at least: The required version number must match the one declared in readme.txt ("6.2" instead of "6.4")
  • 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 plugin10,143 lines of code in 43 files:
LanguageFilesBlank linesComment linesLines of code
PHP361,1021,2756,491
JavaScript55016462,292
CSS2273551,360

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.48
Average class complexity34.86
▷ Minimum class complexity1.00
▷ Maximum class complexity168.00
Average method complexity5.62
▷ Minimum method complexity1.00
▷ Maximum method complexity74.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes22
▷ Abstract classes00.00%
▷ Concrete classes22100.00%
▷ Final classes00.00%
Methods162
▷ Static methods10.62%
▷ Public methods162100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions46
▷ Named functions4495.65%
▷ Anonymous functions24.35%
Constants4
▷ Global constants4100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
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
asset/edit.png3.09KB0.70KB▼ 77.43%
warehouse-dropship/wild/assets/images/edit.png3.09KB0.70KB▼ 77.43%
warehouse-dropship/wild/assets/images/delete.png3.49KB0.86KB▼ 75.41%
asset/delete.png3.49KB0.86KB▼ 75.41%