89% pb-shipping

Code Review | Enterprise Shipping for Pitney Bowes

WordPress plugin Enterprise Shipping for Pitney Bowes scored89%from 54 tests.

About plugin

  • Plugin page: pb-shipping
  • Plugin version: 3.2.15
  • PHP version: 7.4.16
  • WordPress compatibility: 6.0-6.4
  • WordPress version: 6.3.1
  • First release: Apr 9, 2021
  • Latest release: Nov 19, 2023
  • Number of updates: 101
  • Update frequency: every 9.4 days
  • Top authors: rermis (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /2,529 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully

Server metrics [RAM: ▲0.50MB] [CPU: ▼4.43ms] Passed 4 tests

A check of server-side resources used by Enterprise Shipping for Pitney Bowes
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.87 ▲0.4139.21 ▼2.05
Dashboard /wp-admin3.83 ▲0.5247.45 ▼2.59
Posts /wp-admin/edit.php3.94 ▲0.5950.84 ▼0.82
Add New Post /wp-admin/post-new.php6.41 ▲0.5290.23 ▼12.25
Media Library /wp-admin/upload.php3.78 ▲0.5537.78 ▲2.06
PB Ship Admin /wp-admin/options-general.php?page=pb-admin3.7842.61
PB Ship Admin /wp-admin/admin.php?page=pb-admin3.7843.56

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

A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 12 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
widget_recent-comments
theysaidso_admin_options
db_upgraded
widget_theysaidso_widget
can_compress_scripts

Browser metrics Passed 4 tests

Checking browser requirements for Enterprise Shipping for Pitney Bowes
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,796 ▲4914.31 ▼0.331.57 ▼0.1436.69 ▼8.04
Dashboard /wp-admin2,204 ▲275.60 ▼0.0586.53 ▼10.4738.42 ▼5.74
Posts /wp-admin/edit.php2,110 ▲101.98 ▼0.0039.78 ▲4.1236.68 ▼0.01
Add New Post /wp-admin/post-new.php1,532 ▲623.14 ▲0.01654.85 ▼34.5355.29 ▼3.70
Media Library /wp-admin/upload.php1,407 ▲44.23 ▲0.0195.46 ▼2.6441.65 ▼0.13
PB Ship Admin /wp-admin/options-general.php?page=pb-admin1,8812.1424.5041.76
PB Ship Admin /wp-admin/admin.php?page=pb-admin1,8782.3226.9933.85

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
You still need to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-posts
    • can_compress_scripts
    • widget_recent-comments
    • db_upgraded

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP Passed 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
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 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
These attributes need your attention:
  • Screenshots: These screenshots need descriptions #1, #2, #3, #4 in pb-shipping/assets to your readme.txt
The official readme.txt is a good inspiration

pb-shipping/pb_functions.php 85% from 13 tests

The principal PHP file in "Enterprise Shipping for Pitney Bowes" v. 3.2.15 is loaded by WordPress automatically on each request
You should first fix the following items:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("pb-shipping.php" instead of "pb_functions.php")
  • Requires at least: Required version does not match the one declared in readme.txt ("4.6" instead of "6.0")

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
Good job! No executable or dangerous file extensions detected3,413 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP5390983,413

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.50
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions70
▷ Named functions6998.57%
▷ Anonymous functions11.43%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
4 PNG files occupy 0.20MB with 0.08MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/icon-msg.png3.63KB3.64KB0.00%
assets/icon-trns.png8.17KB3.74KB▼ 54.23%
assets/pb_logo.png181.92KB82.46KB▼ 54.67%
assets/icon-256x256.png7.64KB3.71KB▼ 51.44%