99% postcode-shipping

Code Review | Postcode Shipping Rates- WooCommerce

WordPress plugin Postcode Shipping Rates- WooCommerce scored 99% from 54 tests.

About plugin

  • Plugin page: postcode-shipping
  • Plugin version: 2.1.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-4.0
  • WordPress version: 5.8.1
  • First release: Jan 15, 2014
  • Latest release: Oct 14, 2014
  • Number of updates: 16
  • Update frequency: every 17.2 days
  • Top authors: Rizwanahammad (100%)

Code review

54 tests

User reviews

10 reviews

Install metrics

700+ active / 16,646 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
This plugin's installer ran successfully

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

An overview of server-side resources used by Postcode Shipping Rates- WooCommerce
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /2.89 ▲0.0633.70 ▼0.67
Dashboard /wp-admin3.12 ▲0.0647.98 ▲2.61
Posts /wp-admin/edit.php3.17 ▲0.0648.30 ▼7.04
Add New Post /wp-admin/post-new.php5.48 ▲0.0491.83 ▼580.17
Media Library /wp-admin/upload.php3.06 ▲0.0629.69 ▼3.57

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 3 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

Postcode Shipping Rates- WooCommerce: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,679 ▲8315.91 ▲0.217.79 ▼0.7249.67 ▲1.92
Dashboard /wp-admin2,967 ▲365.92 ▼0.04140.06 ▼34.92110.05 ▼2.87
Posts /wp-admin/edit.php2,739 ▼02.72 ▲0.0163.29 ▼27.5887.71 ▼9.29
Add New Post /wp-admin/post-new.php1,500 ▼18318.84 ▲0.13387.15 ▼8.36123.00 ▲14.75
Media Library /wp-admin/upload.php1,807 ▼35.05 ▲0.01181.79 ▼27.44129.73 ▲2.55

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
Uninstaller ran successfully

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP Passed 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Congratulations! This plugin passed the SRP test

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser issues were found

Optimizations

Plugin configuration 83% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
Please fix the following attributes:
  • Contributors: Plugin contributors field is missing
  • Tags: Please delete some tags, you are using 31 tag instead of maximum 10
Please take inspiration from this readme.txt

postcode-shipping/postcode_shipping.php 77% from 13 tests

The main PHP script in "Postcode Shipping Rates- WooCommerce" version 2.1.2 is automatically included on every request by WordPress
Please make the necessary changes and fix the following:
  • Text Domain: The text domain name should consist of only dashes and lowercase characters
  • Domain Path: The domain path folder does not exist ("/lang")
  • Main file name: The principal plugin file should be the same as the plugin slug ("postcode-shipping.php" instead of "postcode_shipping.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Everything looks great! No dangerous files found in this plugin344 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP140878344

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.30
Average class complexity37.00
▷ Minimum class complexity37.00
▷ Maximum class complexity37.00
Average method complexity4.60
▷ Minimum method complexity1.00
▷ Maximum method complexity26.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods10
▷ Static methods00.00%
▷ Public methods10100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions2
▷ Named functions2100.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
1 PNG file occupies 0.09MB with 0.04MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png91.01KB54.61KB▼ 39.99%