57% small-package-quotes-wwe-edition

Code Review | Small Package Quotes - Worldwide Express Edition

WordPress plugin Small Package Quotes - Worldwide Express Edition scored 57% from 54 tests.

About plugin

  • Plugin page: small-package-quo...
  • Plugin version: 5.2.6
  • PHP version: 7.4.16
  • WordPress compatibility: 5.7-6.3.1
  • WordPress version: 6.3.1
  • First release: May 5, 2016
  • Latest release: Sep 25, 2023
  • Number of updates: 106
  • Update frequency: every 25.5 days
  • Top authors: enituretechnology (100%)

Code review

54 tests

User reviews

1 review

Install metrics

60+ active / 8,483 total downloads

Benchmarks

Plugin footprint 48% 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.67MB] [CPU: ▼24.83ms] Passed 4 tests

This is a short check of server-side resources used by Small Package Quotes - Worldwide Express Edition
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.78 ▲0.3239.67 ▼2.82
Dashboard /wp-admin3.28 ▼0.0334.90 ▼12.83
Posts /wp-admin/edit.php3.28 ▼0.0828.83 ▼15.31
Add New Post /wp-admin/post-new.php3.28 ▼2.6129.21 ▼66.21
Media Library /wp-admin/upload.php3.28 ▲0.0527.89 ▼4.96

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

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 64 new files
Database: 1 new table, 18 new options
New tables
wp_warehouse
New WordPress options
en_async_orders_exporting_process
wwe_small_packaging_type
wwe_small_packages_quotes_package
wwe_small_packages_quotes_store_type
en_orders_ids_flag
eniture_plugin_1
can_compress_scripts
wc_pervent_proceed_checkout_eniture
db_upgraded
widget_recent-posts
...

Browser metrics Passed 4 tests

A check of browser resources used by Small Package Quotes - Worldwide Express Edition
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,953 ▲21814.07 ▼0.315.90 ▲4.2541.36 ▲0.01
Dashboard /wp-admin2,250 ▲595.21 ▼0.70108.97 ▲8.1940.84 ▼5.41
Posts /wp-admin/edit.php2,136 ▲472.36 ▲0.3344.74 ▲9.5732.39 ▼2.69
Add New Post /wp-admin/post-new.php1,561 ▲2823.25 ▲0.15607.10 ▼34.8533.10 ▼18.23
Media Library /wp-admin/upload.php1,435 ▲504.44 ▲0.23104.05 ▲0.3242.68 ▼1.11

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
Please fix the following items
  • 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 tables detected upon uninstall: 1 table
    • wp_warehouse
  • This plugin does not fully uninstall, leaving 14 options in the database
    • en_async_orders_exporting_process
    • db_upgraded
    • wc_pervent_proceed_checkout_eniture
    • widget_recent-posts
    • widget_recent-comments
    • widget_theysaidso_widget
    • wwe_small_packaging_type
    • prevent_proceed_checkout_eniture
    • en_orders_ids_flag
    • theysaidso_admin_options
    • ...

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP 0% 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
Almost there! Just fix the following items
  • 2× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/small-package-quotes-wwe-edition/template/en-wwe-small-compare-rates.php
    • > /wp-content/plugins/small-package-quotes-wwe-edition/logs/en-json-tree-view/en-jtv.php
  • 9× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Class 'Small_Package_Request' not found in wp-content/plugins/small-package-quotes-wwe-edition/logs/en-logs.php:14
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/small-package-quotes-wwe-edition/orders/rates/order-rates.php:13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/small-package-quotes-wwe-edition/orders/en-order-export.php:14
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/small-package-quotes-wwe-edition/template/csv-export.php:9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/small-package-quotes-wwe-edition/fdo/en-sbs.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/small-package-quotes-wwe-edition/product/en-common-product-detail.php:26
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/small-package-quotes-wwe-edition/product/en-product-detail.php:26
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/small-package-quotes-wwe-edition/orders/en-order-widget.php:16
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/small-package-quotes-wwe-edition/orders/assets/js/en_wwe_admin_order.php:4

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)
Everything seems fine on the user side

Optimizations

Plugin configuration 86% from 29 tests

readme.txt 94% from 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
Attributes that require attention:
  • Tags: You are using too many tags: 15 tag instead of maximum 10
The official readme.txt is a good inspiration

small-package-quotes-wwe-edition/woocommerceShip.php 77% from 13 tests

"Small Package Quotes - Worldwide Express Edition" version 5.2.6's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
Please take the time to 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: The required version number did not match the one declared in readme.txt ("6.2" instead of "5.7")
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("small-package-quotes-wwe-edition.php" instead of "woocommerceShip.php")

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Good job! No executable or dangerous file extensions detected12,200 lines of code in 54 files:
LanguageFilesBlank linesComment linesLines of code
PHP441,3641,4518,231
JavaScript65106222,620
CSS4188351,349

PHP code 50% from 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
The following items need your attention
  • Cyclomatic complexity of methods has to be reduced to less than 100 (currently 112)
Cyclomatic complexity
Average complexity per logical line of code0.51
Average class complexity42.30
▷ Minimum class complexity3.00
▷ Maximum class complexity237.00
Average method complexity6.39
▷ Minimum method complexity1.00
▷ Maximum method complexity112.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes27
▷ Abstract classes00.00%
▷ Concrete classes27100.00%
▷ Final classes00.00%
Methods207
▷ Static methods20.97%
▷ Public methods207100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions77
▷ Named functions7698.70%
▷ Anonymous functions11.30%
Constants6
▷ Global constants6100.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/delete.png3.49KB0.86KB▼ 75.41%
asset/edit.png3.09KB0.70KB▼ 77.43%
warehouse-dropship/wild/assets/images/edit.png3.09KB0.70KB▼ 77.43%
asset/delete.png3.49KB0.86KB▼ 75.41%