78% check-zipcode

Code Review | Check Zipcode

WordPress plugin Check Zipcode scored 78% from 54 tests.

About plugin

  • Plugin page: check-zipcode
  • Plugin version: 1.0.1
  • PHP compatiblity: 7.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.2-5.8.1
  • WordPress version: 5.9.2
  • First release: Oct 24, 2021
  • Latest release: Feb 28, 2022
  • Number of updates: 28
  • Update frequency: every 4.6 days
  • Top authors: paulio21 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 149 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲4.73MB] [CPU: ▼276.89ms] Passed 4 tests

Server-side resources used by Check Zipcode
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /8.66 ▲5.1471.53 ▲21.79
Dashboard /wp-admin8.68 ▲5.2753.51 ▲20.40
Posts /wp-admin/edit.php8.68 ▲5.0456.64 ▲16.66
Add New Post /wp-admin/post-new.php10.44 ▲3.47114.24 ▼1,162.84
Media Library /wp-admin/upload.php8.68 ▲5.3841.97 ▲18.23
Freemius Debug [v.2.4.3] /wp-admin/admin.php?page=freemius8.6842.27

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

Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 168 new files
Database: no new tables, 10 new options
New WordPress options
zip_negative_message
fs_debug_mode
fs_active_plugins
zip_positive_message
fs_accounts
fs_gdpr
zip_zipcodes
zip_use_message
pro_zipcodes
trial_zipcodes

Browser metrics Passed 4 tests

An overview of browser requirements for Check Zipcode
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,954 ▲20015.97 ▼0.078.73 ▲2.212.33 ▼0.28
Dashboard /wp-admin2,937 ▲766.24 ▲0.05122.25 ▼16.16204.16 ▲44.63
Posts /wp-admin/edit.php2,733 ▲422.98 ▼0.2664.65 ▲1.08156.56 ▲12.47
Add New Post /wp-admin/post-new.php1,684 ▼3320.39 ▼0.74435.25 ▼2.35188.31 ▲28.15
Media Library /wp-admin/upload.php1,743 ▲455.67 ▲0.12124.38 ▼13.18225.28 ▲36.27
Freemius Debug [v.2.4.3] /wp-admin/admin.php?page=freemius1,4632.5053.27110.56

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • Uninstall procedure validation failed for this plugin
    • > Notice in wp-content/plugins/check-zipcode/freemius/includes/class-freemius.php+8575
    Undefined property: stdClass::$plugins
  • The uninstall procedure has failed, leaving 4 options in the database
    • fs_gdpr
    • fs_active_plugins
    • fs_debug_mode
    • fs_accounts

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though no errors were found, 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
Looking good! No server-side errors or output on direct access of PHP files

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 83% from 29 tests

readme.txt 88% 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
These attributes need to be fixed:
  • Screenshots: Please add images for these screenshots: #1 (Professional Settings Screen), #2 (Positive Message Screen), #3 (Negative Message Screen)
  • Tags: You are using too many tags: 13 tag instead of maximum 10
The official readme.txt is a good inspiration

check-zipcode/checkzipcode.php 77% from 13 tests

The main PHP script in "Check Zipcode" version 1.0.1 is automatically included on every request by WordPress
Please make the necessary changes and fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("check-zipcode.php" instead of "checkzipcode.php")
  • Requires at least: The required version number must match the one declared in readme.txt ("5.2.2" instead of "5.2")
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 174 characters long)

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
There were no executable files found in this plugin30,812 lines of code in 126 files:
LanguageFilesBlank linesComment linesLines of code
PHP1107,28416,11230,588
JavaScript43759206
CSS120018

PHP code 50% from 2 tests

A short review of cyclomatic complexity and code structure
It is recommended to fix the following
  • Please reduce cyclomatic complexity of classes to less than 1000 (currently 2,910)
Cyclomatic complexity
Average complexity per logical line of code0.63
Average class complexity88.46
▷ Minimum class complexity1.00
▷ Maximum class complexity2,910.00
Average method complexity4.62
▷ Minimum method complexity1.00
▷ Maximum method complexity86.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes46
▷ Abstract classes24.35%
▷ Concrete classes4495.65%
▷ Final classes00.00%
Methods1,143
▷ Static methods17315.14%
▷ Public methods80370.25%
▷ Protected methods151.31%
▷ Private methods32528.43%
Functions94
▷ Named functions94100.00%
▷ Anonymous functions00.00%
Constants125
▷ Global constants10080.00%
▷ Class constants2520.00%
▷ Public constants25100.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
2 PNG files occupy 0.02MB with 0.01MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
freemius/assets/img/theme-icon.png10.97KB5.78KB▼ 47.37%
freemius/assets/img/plugin-icon.png9.16KB5.26KB▼ 42.58%