73% small-package-quotes-unishippers-edition

Code Review | Small Package Quotes - Unishippers Edition

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

About plugin

  • Plugin page: small-package-quo...
  • Plugin version: 2.3.5
  • PHP version: 7.4.16
  • WordPress compatibility: 6.4-6.4
  • WordPress version: 6.3.1
  • First release: Dec 2, 2019
  • Latest release: Nov 28, 2023
  • Number of updates: 44
  • Update frequency: every 33.2 days
  • Top authors: enituretechnology (100%)

Code review

54 tests

User reviews

1 review

Install metrics

40+ active /2,636 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Installer ran successfully

Server metrics [RAM: ▼0.81MB] [CPU: ▼28.75ms] Passed 4 tests

An overview of server-side resources used by Small Package Quotes - Unishippers Edition
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.59 ▲0.1240.98 ▲0.10
Dashboard /wp-admin3.14 ▼0.1726.02 ▼23.60
Posts /wp-admin/edit.php3.14 ▼0.2227.59 ▼25.04
Add New Post /wp-admin/post-new.php3.14 ▼2.7527.62 ▼59.31
Media Library /wp-admin/upload.php3.14 ▼0.0923.71 ▼7.06

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

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

Browser metrics Passed 4 tests

A check of browser resources used by Small Package Quotes - Unishippers Edition
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,887 ▲14013.40 ▲0.238.23 ▲4.4237.17 ▼6.29
Dashboard /wp-admin2,208 ▲315.63 ▼0.0191.33 ▲0.3838.79 ▼1.65
Posts /wp-admin/edit.php2,114 ▲142.13 ▲0.1939.13 ▲0.5035.72 ▲5.20
Add New Post /wp-admin/post-new.php1,539 ▲1320.90 ▼2.25567.67 ▼42.0747.41 ▼14.54
Media Library /wp-admin/upload.php1,416 ▲194.22 ▲0.0796.30 ▲0.6441.84 ▼0.22

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
Please fix the following items
  • 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 were found after uninstall: 7 options
    • widget_recent-posts
    • theysaidso_admin_options
    • db_upgraded
    • can_compress_scripts
    • widget_recent-comments
    • unishepper_small_web_hook_plan_requests
    • widget_theysaidso_widget

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
Even though no errors were found, this is by no means an exhaustive test

SRP 50% 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 fix the following
  • 6× 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/small-package-quotes-unishippers-edition/template/csv-export.php:9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/small-package-quotes-unishippers-edition/fdo/en-sbs.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/small-package-quotes-unishippers-edition/order-details/en-order-export.php:14
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/small-package-quotes-unishippers-edition/template/en-product-detail.php:23
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/small-package-quotes-unishippers-edition/order-details/rates/order-rates.php:13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/small-package-quotes-unishippers-edition/order-details/en-order-widget.php:16

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
There were no browser issues found

Optimizations

Plugin configuration 86% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
Attributes that need to be fixed:
  • Tags: You are using too many tags: 14 tag instead of maximum 10
You can look at the official readme.txt

small-package-quotes-unishippers-edition/small-package-quotes-unishipper-edition.php 77% from 13 tests

"Small Package Quotes - Unishippers Edition" version 2.3.5's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
Please make the necessary changes and fix the following:
  • Text Domain: The text domain is optional since WordPress version 4.6; if you do specify it, it must be the same as the plugin slug
  • Requires at least: Required version must match the one declared in readme.txt ("6.2" instead of "6.4")
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("small-package-quotes-unishippers-edition.php" instead of "small-package-quotes-unishipper-edition.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Good job! No executable or dangerous file extensions detected11,687 lines of code in 52 files:
LanguageFilesBlank linesComment linesLines of code
PHP451,3941,6308,233
JavaScript55156872,483
CSS212947971

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.52
Average class complexity37.00
▷ Minimum class complexity2.00
▷ Maximum class complexity240.00
Average method complexity5.94
▷ Minimum method complexity1.00
▷ Maximum method complexity83.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes29
▷ Abstract classes00.00%
▷ Concrete classes29100.00%
▷ Final classes00.00%
Methods212
▷ Static methods10.47%
▷ Public methods212100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions66
▷ Named functions6395.45%
▷ Anonymous functions34.55%
Constants6
▷ Global constants6100.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/delete.png3.49KB0.86KB▼ 75.41%
warehouse-dropship/wild/assets/images/edit.png3.09KB0.70KB▼ 77.43%
warehouse-dropship/wild/assets/images/delete.png3.49KB0.86KB▼ 75.41%
asset/edit.png3.09KB0.70KB▼ 77.43%