83% postmen-woo-shipping

Code Review | AfterShip Shipping: Free Shipping Labels for WooCommerce, Discounted Shipping Rates

WordPress plugin AfterShip Shipping: Free Shipping Labels for WooCommerce, Discounted Shipping Rates scored83%from 54 tests.

About plugin

  • Plugin page: postmen-woo-shipping
  • Plugin version: 1.3.14
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4-6.3
  • WordPress version: 6.3.1
  • First release: Apr 15, 2016
  • Latest release: Sep 1, 2023
  • Number of updates: 96
  • Update frequency: every 28.1 days
  • Top authors: aftership (100%)

Code review

54 tests

User reviews

14 reviews

Install metrics

600+ active /28,035 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.18MB] [CPU: ▼3.08ms] Passed 4 tests

A check of server-side resources used by AfterShip Shipping: Free Shipping Labels for WooCommerce, Discounted Shipping Rates
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.63 ▲0.1743.17 ▼0.29
Dashboard /wp-admin3.53 ▲0.2249.76 ▲1.36
Posts /wp-admin/edit.php3.58 ▲0.2246.46 ▼4.91
Add New Post /wp-admin/post-new.php6.05 ▲0.1687.41 ▼7.51
Media Library /wp-admin/upload.php3.39 ▲0.1638.22 ▲0.41

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

How much does this plugin use your filesystem and database?
The plugin installed successfully
Filesystem: 32 new files
Database: no new tables, 10 new options
New WordPress options
db_upgraded
PostmenWoocommercePlugin_Plugin_CanDoSomething
widget_recent-posts
PostmenWoocommercePlugin_Plugin__installed
PostmenWoocommercePlugin_Plugin_AmAwesome
theysaidso_admin_options
widget_recent-comments
widget_theysaidso_widget
PostmenWoocommercePlugin_Plugin__version
can_compress_scripts

Browser metrics Passed 4 tests

An overview of browser requirements for AfterShip Shipping: Free Shipping Labels for WooCommerce, Discounted Shipping Rates
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5414.45 ▲0.142.10 ▲0.1445.16 ▲0.25
Dashboard /wp-admin2,206 ▲185.81 ▼0.0097.83 ▼20.2237.99 ▼6.70
Posts /wp-admin/edit.php2,089 ▼02.02 ▼0.0138.66 ▲1.0538.22 ▲4.07
Add New Post /wp-admin/post-new.php1,533 ▼023.09 ▼0.36674.35 ▲40.7857.05 ▲6.46
Media Library /wp-admin/upload.php1,388 ▲34.28 ▲0.0797.10 ▼5.2142.94 ▼2.41

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • This plugin did not uninstall successfully, leaving 10 options in the database
    • PostmenWoocommercePlugin_Plugin_AmAwesome
    • db_upgraded
    • widget_recent-comments
    • can_compress_scripts
    • PostmenWoocommercePlugin_Plugin_CanDoSomething
    • widget_recent-posts
    • widget_theysaidso_widget
    • PostmenWoocommercePlugin_Plugin__version
    • PostmenWoocommercePlugin_Plugin__installed
    • theysaidso_admin_options

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
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 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
Almost there! Just fix the following items
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/postmen-woo-shipping/postmen-woocommerce-plugin.php:84

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 Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
10 plugin tags: woocommerce, dhl, usps, canada post, weight based shipping...

postmen-woo-shipping/postmen-woocommerce-plugin.php 69% from 13 tests

The main PHP file in "AfterShip Shipping: Free Shipping Labels for WooCommerce, Discounted Shipping Rates" ver. 1.3.14 adds more information about the plugin and also serves as the entry point for this plugin
It is important to fix the following:
  • Description: The description should be shorter than 140 characters (currently 145 characters long)
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6
  • Plugin Name: Please shorten the plugin name (currently 83 characters long instead of max. 70)
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("postmen-woo-shipping.php" instead of "postmen-woocommerce-plugin.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
There were no executable files found in this plugin2,820 lines of code in 21 files:
LanguageFilesBlank linesComment linesLines of code
PHP207201,5562,786
JavaScript18734

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.47
Average class complexity20.47
▷ Minimum class complexity1.00
▷ Maximum class complexity78.00
Average method complexity3.34
▷ Minimum method complexity1.00
▷ Maximum method complexity23.00
Code structure
Namespaces0
Interfaces1
Traits0
Classes16
▷ Abstract classes212.50%
▷ Concrete classes1487.50%
▷ Final classes00.00%
Methods147
▷ Static methods00.00%
▷ Public methods9665.31%
▷ Protected methods3725.17%
▷ Private methods149.52%
Functions14
▷ Named functions1392.86%
▷ Anonymous functions17.14%
Constants18
▷ Global constants15.56%
▷ Class constants1794.44%
▷ Public constants17100.00%

Plugin size 0% from 2 tests

Image compression 0% from 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
10 PNG files occupy 0.54MB with 0.35MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/banner-772x250.png55.23KB25.21KB▼ 54.35%
assets/icon-256x256.png4.21KB1.96KB▼ 53.30%
assets/icon-128x128.png2.64KB1.05KB▼ 60.18%
(invalid) assets/screenshot-1.png55.60KB0.00KB▼ 100.00%
assets/banner-1544x500.png138.88KB62.72KB▼ 54.84%