89% woo-ups-shipping

Code Review | UPS Shipping

WordPress plugin UPS Shipping scored89%from 54 tests.

About plugin

  • Plugin page: woo-ups-shipping
  • Plugin version: 2.1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4-5.7.0
  • WordPress version: 6.3.1
  • First release: Dec 9, 2017
  • Latest release: Apr 5, 2021
  • Number of updates: 18
  • Update frequency: every 67.4 days
  • Top authors: mingocommerce (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

100+ active /2,701 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
This plugin's installer ran successfully

Server metrics [RAM: ▲0.06MB] [CPU: ▼1.48ms] Passed 4 tests

Server-side resources used by UPS Shipping
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0634.36 ▼3.05
Dashboard /wp-admin3.36 ▲0.0650.85 ▼1.76
Posts /wp-admin/edit.php3.47 ▲0.1248.77 ▲2.12
Add New Post /wp-admin/post-new.php5.94 ▲0.0692.02 ▲2.57
Media Library /wp-admin/upload.php3.28 ▲0.0634.53 ▼3.22

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

Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 2 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
theysaidso_admin_options
widget_recent-comments
can_compress_scripts
db_upgraded
widget_theysaidso_widget

Browser metrics Passed 4 tests

Checking browser requirements for UPS Shipping
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲2914.48 ▲0.111.69 ▼0.1140.90 ▲1.08
Dashboard /wp-admin2,206 ▲215.91 ▲0.10107.52 ▲7.5841.65 ▼0.10
Posts /wp-admin/edit.php2,092 ▲32.04 ▲0.0343.20 ▲8.9934.19 ▲0.62
Add New Post /wp-admin/post-new.php1,534 ▲623.13 ▲4.95663.18 ▲60.8661.43 ▼4.76
Media Library /wp-admin/upload.php1,388 ▼04.20 ▲0.0393.58 ▼9.5343.86 ▼0.72

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
You still need to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-posts
    • widget_theysaidso_widget
    • widget_recent-comments
    • theysaidso_admin_options
    • db_upgraded
    • can_compress_scripts

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Good news, no errors were detected

SRP Passed 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Looking good! No server-side errors or output on direct access of PHP files

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, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
4 plugin tags: ups shipping, ups, ups shipping rate, shipping method

woo-ups-shipping/woo-ups-shipping.php 85% from 13 tests

"UPS Shipping" version 2.1.1's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
The following require your attention:
  • Domain Path: The domain path folder was not found ("/i18n")
  • 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 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
There were no executable files found in this plugin348 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP17860348

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.52
Average class complexity22.50
▷ Minimum class complexity3.00
▷ Maximum class complexity42.00
Average method complexity3.87
▷ Minimum method complexity1.00
▷ Maximum method complexity12.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods15
▷ Static methods00.00%
▷ Public methods15100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
No PNG images were found in this plugin