94% ship-to-multiple-addresses

Code Review | Ship to Multiple Addresses

WordPress plugin Ship to Multiple Addresses scored 94% from 54 tests.

About plugin

  • Plugin page: ship-to-multiple-...
  • Plugin version: 1.2.0
  • PHP compatiblity: 7.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.5-5.6
  • WordPress version: 5.8.1
  • First release: Dec 22, 2020
  • Latest release: Jan 24, 2021
  • Number of updates: 8
  • Update frequency: every 4.1 days
  • Top authors: samuilmarinov (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 180 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.10MB] [CPU: ▼141.52ms] Passed 4 tests

A check of server-side resources used by Ship to Multiple Addresses
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.88 ▲0.0425.99 ▼2.75
Dashboard /wp-admin3.19 ▲0.1347.15 ▲4.46
Posts /wp-admin/edit.php3.30 ▲0.1934.83 ▲1.50
Add New Post /wp-admin/post-new.php5.55 ▲0.1188.15 ▼564.49
Media Library /wp-admin/upload.php3.13 ▲0.1233.39 ▼0.33

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

A short overview of filesystem and database impact
The plugin installed successfully
Filesystem: 23 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

Checking browser requirements for Ship to Multiple Addresses
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,816 ▲22016.34 ▲0.7112.26 ▲2.0951.42 ▲7.66
Dashboard /wp-admin2,974 ▲405.94 ▼0.16132.96 ▼9.17113.71 ▲1.78
Posts /wp-admin/edit.php2,743 ▲42.71 ▲0.0163.14 ▼3.89100.21 ▲13.33
Add New Post /wp-admin/post-new.php1,876 ▲19318.86 ▲0.14347.78 ▼34.43114.25 ▲8.54
Media Library /wp-admin/upload.php1,840 ▲335.11 ▲0.09150.70 ▼17.67113.83 ▼1.44

Uninstaller [IO: ▲0.16MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The plugin uninstalled completely, with no zombie files or tables

Smoke tests 75% from 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 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 take a closer look at the following
  • 2× PHP files output text when accessed directly:
    • > /wp-content/plugins/ship-to-multiple-addresses/admin/partials/ship_to_multiple_addresses-admin-display.php
    • > /wp-content/plugins/ship-to-multiple-addresses/public/partials/ship_to_multiple_addresses-public-display.php

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser errors were detected

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
3 plugin tags: ship to multiple addresses, multiple shipping, multiple shipping destinations

ship-to-multiple-addresses/ship_to_multiple_addresses.php 85% from 13 tests

"Ship to Multiple Addresses" version 1.2.0's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
You should first fix the following items:
  • Main file name: The principal plugin file should be the same as the plugin slug ("ship-to-multiple-addresses.php" instead of "ship_to_multiple_addresses.php")
  • Text Domain: The text domain name must use dashes instead of underscores, and it must be lowercase

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Success! There were no dangerous files found in this plugin544 lines of code in 16 files:
LanguageFilesBlank linesComment linesLines of code
PHP12183572538
JavaScript24546
CSS2080

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.19
Average class complexity1.43
▷ Minimum class complexity1.00
▷ Maximum class complexity3.00
Average method complexity1.13
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods23
▷ Static methods28.70%
▷ Public methods1878.26%
▷ Protected methods00.00%
▷ Private methods521.74%
Functions13
▷ Named functions13100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.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
1 PNG file occupies 0.05MB with 0.03MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
admin/icon-256x256.png52.48KB17.93KB▼ 65.83%