77% check-pincodezipcode-for-shipping-woocommerce

Code Review | Check Pincode/Zipcode for Shipping Woocommerce

WordPress plugin Check Pincode/Zipcode for Shipping Woocommerce scored 77% from 54 tests.

About plugin

  • Plugin page: check-pincodezipc...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress version: 5.9.2
  • First release: Dec 30, 2019
  • Latest release: Feb 16, 2022
  • Number of updates: 34
  • Update frequency: every 23.0 days
  • Top authors: vp956009 (100%)

Code review

54 tests

User reviews

12 reviews

Install metrics

1,000+ active / 11,584 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Installer ran successfully

Server metrics [RAM: ▼0.02MB] [CPU: ▼312.71ms] Passed 4 tests

Analyzing server-side resources used by Check Pincode/Zipcode for Shipping Woocommerce
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0162.89 ▲6.03
Dashboard /wp-admin3.41 ▲0.0053.59 ▲15.24
Posts /wp-admin/edit.php3.64 ▲0.0042.80 ▲1.41
Add New Post /wp-admin/post-new.php6.88 ▼0.0998.48 ▼1,254.49
Media Library /wp-admin/upload.php3.29 ▲0.0026.40 ▼3.80
Add Post codes /wp-admin/admin.php?page=post-code3.1020.50
Import Post codes /wp-admin/admin.php?page=post-code-import3.1020.59
Essential Kit /wp-admin/admin.php?page=wczp_kit3.1018.80
List Post codes /wp-admin/admin.php?page=post-code-list3.1017.27
Settings /wp-admin/admin.php?page=post-code-setting3.1017.14

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 20 new files
Database: 1 new table, no new options
New tables
wp_wczp_postcode

Browser metrics Passed 4 tests

A check of browser resources used by Check Pincode/Zipcode for Shipping Woocommerce
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,868 ▲14516.50 ▲1.817.01 ▼0.412.69 ▲0.27
Dashboard /wp-admin2,878 ▲176.17 ▲0.02114.50 ▼19.25155.29 ▼6.86
Posts /wp-admin/edit.php2,694 ▲33.23 ▲0.0184.28 ▲20.46155.81 ▲18.01
Add New Post /wp-admin/post-new.php1,660 ▼9816.32 ▼5.09423.46 ▼41.49159.82 ▼5.70
Media Library /wp-admin/upload.php1,698 ▼05.52 ▲0.03137.42 ▼5.82187.99 ▲2.94
Add Post codes /wp-admin/admin.php?page=post-code280.940.0318.64
Import Post codes /wp-admin/admin.php?page=post-code-import280.940.1116.59
Essential Kit /wp-admin/admin.php?page=wczp_kit280.940.0323.44
List Post codes /wp-admin/admin.php?page=post-code-list280.940.0318.82
Settings /wp-admin/admin.php?page=post-code-setting280.940.0419.66

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
  • Zombie tables detected upon uninstall: 1 table
    • wp_wczp_postcode

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Even though everything seems fine, this is not an exhaustive test

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
The following issues need your attention
  • 1× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/check-pincodezipcode-for-shipping-woocommerce/woo-check-zipcode-pincode.php

User-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Please take a look at the following user-side issues
    • > 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-import
    • > Network (severe)
    wp-admin/admin.php?page=post-code-import - Failed to load resource: the server responded with a status of 403 (Forbidden)
    • > GET request to /wp-admin/admin.php?page=wczp_kit
    • > Network (severe)
    wp-admin/admin.php?page=wczp_kit - Failed to load resource: the server responded with a status of 403 (Forbidden)
    • > GET request to /wp-admin/admin.php?page=post-code-list
    • > Network (severe)
    wp-admin/admin.php?page=post-code-list - 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)

Optimizations

Plugin configuration 87% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
Attributes that require attention: Please take inspiration from this readme.txt

check-pincodezipcode-for-shipping-woocommerce/woo-check-zipcode-pincode.php 85% from 13 tests

The entry point to "Check Pincode/Zipcode for Shipping Woocommerce" version 1.0 is a PHP file that has certain tags in its header comment area
Please take the time to fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("check-pincodezipcode-for-shipping-woocommerce.php" instead of "woo-check-zipcode-pincode.php")
  • Domain Path: The domain path points to a folder that does not exist ("/languages")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
No dangerous file extensions were detected2,780 lines of code in 9 files:
LanguageFilesBlank linesComment linesLines of code
PHP4285321,685
CSS277625
JavaScript283146469
SVG1001

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.36
Average class complexity37.00
▷ Minimum class complexity5.00
▷ Maximum class complexity96.00
Average method complexity4.53
▷ Minimum method complexity1.00
▷ Maximum method complexity55.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes5
▷ Abstract classes00.00%
▷ Concrete classes5100.00%
▷ Final classes00.00%
Methods51
▷ Static methods35.88%
▷ Public methods4996.08%
▷ Protected methods00.00%
▷ Private methods23.92%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants6
▷ Global constants6100.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
6 PNG files occupy 0.11MB with 0.05MB 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/review.png15.87KB11.90KB▼ 25.01%
includes/images/false.png27.71KB11.86KB▼ 57.20%
includes/images/true.png23.41KB12.57KB▼ 46.30%
includes/images/star.png39.75KB10.35KB▼ 73.95%