78% check-pincodezipcode-for-shipping-availability

Code Review | Check Pincode/Zipcode for Shipping Availability

WordPress plugin Check Pincode/Zipcode for Shipping Availability scored 78% from 54 tests.

About plugin

  • Plugin page: check-pincodezipc...
  • Plugin version: 3.4
  • PHP version: 7.4.16
  • WordPress version: 5.9.2
  • First release: May 26, 2021
  • Latest release: Feb 4, 2022
  • Number of updates: 18
  • Update frequency: every 14.2 days
  • Top authors: pradeepku041 (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

300+ active / 2,250 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.02MB] [CPU: ▼294.41ms] Passed 4 tests

An overview of server-side resources used by Check Pincode/Zipcode for Shipping Availability
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0153.73 ▲2.12
Dashboard /wp-admin3.41 ▲0.0033.09 ▼0.60
Posts /wp-admin/edit.php3.64 ▲0.0038.72 ▲2.30
Add New Post /wp-admin/post-new.php6.88 ▼0.0992.83 ▼1,180.16
Media Library /wp-admin/upload.php3.29 ▲0.0023.73 ▲1.00
Add Post/Zip codes /wp-admin/admin.php?page=add-post-code3.1017.18
Post/Zip codes /wp-admin/admin.php?page=post-code3.1017.06
Settings /wp-admin/admin.php?page=post-code-setting3.1017.71
Import Post/Zip codes /wp-admin/admin.php?page=post-code-import3.1017.14

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

Analyzing filesystem and database footprints of this plugin
This plugin installed successfully
Filesystem: 21 new files
Database: 1 new table, no new options
New tables
wp_wpcc_postcode

Browser metrics Passed 4 tests

A check of browser resources used by Check Pincode/Zipcode for Shipping Availability
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,878 ▲12516.29 ▲0.655.97 ▲0.482.62 ▼0.21
Dashboard /wp-admin2,895 ▲376.13 ▼0.06114.56 ▼16.48162.70 ▲4.94
Posts /wp-admin/edit.php2,688 ▼03.25 ▲0.0162.20 ▼0.65139.54 ▼4.94
Add New Post /wp-admin/post-new.php1,661 ▼716.84 ▼2.68390.64 ▼22.15153.07 ▲0.61
Media Library /wp-admin/upload.php1,695 ▼05.48 ▼0.01142.54 ▲4.43183.70 ▼0.83
Add Post/Zip codes /wp-admin/admin.php?page=add-post-code280.940.7316.60
Post/Zip codes /wp-admin/admin.php?page=post-code280.940.0516.94
Settings /wp-admin/admin.php?page=post-code-setting280.940.0317.35
Import Post/Zip codes /wp-admin/admin.php?page=post-code-import280.940.0319.94

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • The uninstall procedure failed, leaving 1 table in the database
    • wp_wpcc_postcode

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 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
Please fix the following
  • 1× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/check-pincodezipcode-for-shipping-availability/woo-check-zipcode-pincode.php

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There are user-side issues you should fix
    • > GET request to /wp-admin/admin.php?page=add-post-code
    • > Network (severe)
    wp-admin/admin.php?page=add-post-code - Failed to load resource: the server responded with a status of 403 (Forbidden)
    • > GET request to /wp-admin/admin.php?page=post-code
    • > Network (severe)
    wp-admin/admin.php?page=post-code - Failed to load resource: the server responded with a status of 403 (Forbidden)
    • > GET request to /wp-admin/admin.php?page=post-code-setting
    • > Network (severe)
    wp-admin/admin.php?page=post-code-setting - Failed to load resource: the server responded with a status of 403 (Forbidden)
    • > GET request to /wp-admin/admin.php?page=post-code-import
    • > Network (severe)
    wp-admin/admin.php?page=post-code-import - Failed to load resource: the server responded with a status of 403 (Forbidden)

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
Attributes that require attention: You can look at the official readme.txt

check-pincodezipcode-for-shipping-availability/woo-check-zipcode-pincode.php 92% from 13 tests

The main PHP script in "Check Pincode/Zipcode for Shipping Availability" version 3.4 is automatically included on every request by WordPress
You should first fix the following items:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("check-pincodezipcode-for-shipping-availability.php" instead of "woo-check-zipcode-pincode.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
There were no executable files found in this plugin2,623 lines of code in 9 files:
LanguageFilesBlank linesComment linesLines of code
PHP3291361,510
CSS297622
JavaScript2102146489
SVG2002

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.40
Average class complexity45.25
▷ Minimum class complexity6.00
▷ Maximum class complexity103.00
Average method complexity4.84
▷ Minimum method complexity1.00
▷ Maximum method complexity57.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods46
▷ Static methods48.70%
▷ Public methods4495.65%
▷ Protected methods00.00%
▷ Private methods24.35%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants6
▷ Global constants6100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
6 PNG files occupy 0.11MB with 0.04MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
includes/images/support.png6.44KB5.59KB▼ 13.09%
includes/images/true.png23.41KB12.57KB▼ 46.30%
includes/images/review.png15.87KB11.90KB▼ 25.01%
includes/images/location.png2.88KB1.93KB▼ 32.84%
includes/images/false.png27.71KB11.86KB▼ 57.20%