10% add-zip-codes-to-posts

Code Review | USA Zip Codes by WP Monsters

WordPress plugin USA Zip Codes by WP Monsters scored 10% from 54 tests.

About plugin

  • Plugin page: add-zip-codes-to-...
  • Plugin version: 1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.2.2-4.7.2
  • WordPress version: 5.9.2
  • First release: Mar 9, 2016
  • Latest release: Feb 9, 2017
  • Number of updates: 12
  • Update frequency: every 28.5 days
  • Top authors: Wordpress Monsters (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

10+ active / 1,001 total downloads

Benchmarks

Plugin footprint 75% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The following installer errors require your attention
  • Install procedure had errors
    • > Warning in wp-content/plugins/add-zip-codes-to-posts/zip-codes.php+104
    file_get_contents(http://wp.com/wp-content/plugins/zip-codes/wpm_zip.sql): failed to open stream: HTTP request failed! HTTP/1.1 404 Not Found

Server metrics [RAM: ▼0.90MB] [CPU: ▼317.12ms] Passed 4 tests

An overview of server-side resources used by USA Zip Codes by WP Monsters
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.55 ▲0.0453.33 ▲7.03
Dashboard /wp-admin3.45 ▲0.0433.54 ▼0.03
Posts /wp-admin/edit.php3.68 ▲0.0437.68 ▼0.44
Add New Post /wp-admin/post-new.php3.26 ▼3.7129.08 ▼1,265.42
Media Library /wp-admin/upload.php3.33 ▲0.0325.85 ▼2.60
Zip-codes /wp-admin/options-general.php?page=optionZipCodes3.3027.15

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

How much does this plugin use your filesystem and database?
This plugin installed successfully
Filesystem: 12 new files
Database: 1 new table, no new options
New tables
wp_zipcodes

Browser metrics Passed 4 tests

USA Zip Codes by WP Monsters: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,794 ▲4015.98 ▲0.395.73 ▼0.191.88 ▼1.01
Dashboard /wp-admin2,894 ▲366.16 ▲0.07117.59 ▼18.41152.79 ▼11.52
Posts /wp-admin/edit.php2,666 ▼253.24 ▲0.0166.09 ▼5.01139.25 ▼4.29
Add New Post /wp-admin/post-new.php1,726 ▲3616.96 ▼3.84412.91 ▼124.58154.80 ▼6.55
Media Library /wp-admin/upload.php1,708 ▲75.52 ▼0.02140.11 ▼4.19184.99 ▼2.73
Zip-codes /wp-admin/options-general.php?page=optionZipCodes1,0302.4455.51111.86

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
The plugin uninstalled successfully, without leaving any zombie files or tables

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Good news, no errors were detected

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
Please 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/add-zip-codes-to-posts/zip-codes.php:27

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Please fix the following user-side errors
    • > GET request to /wp-admin/options-general.php?page=optionZipCodes
    • > Network (severe)
    wp-content/plugins/zip-codes/css/style.css?ver=5.9.2 - Failed to load resource: the server responded with a status of 404 (Not Found)
    • > GET request to /wp-admin/options-general.php?page=optionZipCodes
    • > Network (severe)
    wp-content/plugins/zip-codes/js/zip-codes.js?ver=5.9.2 - Failed to load resource: the server responded with a status of 404 (Not Found)

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
Please fix the following attributes:
  • Screenshots: These screenshots do not have images: #1 (This screenshot shows how the plugin looks in admin side.), #2 (This screenshot shows the array you get after use get_post_meta().), #3 (This screenshot shows the settings page of this plugin.)
Please take inspiration from this readme.txt

add-zip-codes-to-posts/zip-codes.php 92% from 13 tests

The principal PHP file in "USA Zip Codes by WP Monsters" v. 1.1 is loaded by WordPress automatically on each request
Please make the necessary changes and fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("add-zip-codes-to-posts.php" instead of "zip-codes.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
Success! There were no dangerous files found in this plugin43,568 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
SQL10043,192
PHP13530155
CSS1211131
JavaScript1191190

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.26
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions10
▷ Named functions10100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
3 PNG files occupy 0.08MB with 0.06MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png31.50KB10.21KB▼ 67.58%
screenshot-3.png38.90KB12.07KB▼ 68.96%
screenshot-2.png9.09KB1.25KB▼ 86.29%