73% zip-jp-postalcode-address-search

Code Review | ZIP-JP Postalcode Address Search

WordPress plugin ZIP-JP Postalcode Address Search scored73%from 54 tests.

About plugin

  • Plugin page: zip-jp-postalcode...
  • Plugin version: 2.0.0
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.5-6.0
  • WordPress version: 6.3.1
  • First release: Aug 4, 2021
  • Latest release: Oct 26, 2022
  • Number of updates: 13
  • Update frequency: every 34.5 days
  • Top authors: milkyfield (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /803 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
This plugin's installer ran successfully

Server metrics [RAM: ▲0.10MB] [CPU: ▼8.97ms] Passed 4 tests

A check of server-side resources used by ZIP-JP Postalcode Address Search
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.58 ▲0.1140.00 ▲0.81
Dashboard /wp-admin3.42 ▲0.0749.62 ▼17.34
Posts /wp-admin/edit.php3.47 ▲0.1148.00 ▼2.57
Add New Post /wp-admin/post-new.php6.02 ▲0.1385.53 ▼16.77
Media Library /wp-admin/upload.php3.34 ▲0.1139.41 ▲3.27

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

Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 36 new files
Database: 1 new table, 7 new options
New tables
wp_zjpas_mfczipjp_cash
New WordPress options
widget_recent-comments
widget_theysaidso_widget
db_upgraded
theysaidso_admin_options
can_compress_scripts
widget_recent-posts
zjpas_mfczipjp_cash_version

Browser metrics Passed 4 tests

A check of browser resources used by ZIP-JP Postalcode Address Search
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,989 ▲22813.66 ▼0.766.26 ▲4.4842.14 ▼0.48
Dashboard /wp-admin2,236 ▲565.87 ▲0.2187.77 ▲0.4936.96 ▼8.32
Posts /wp-admin/edit.php2,147 ▲472.30 ▲0.3542.21 ▲4.9934.70 ▼3.46
Add New Post /wp-admin/post-new.php1,554 ▲1723.59 ▲5.31703.14 ▲56.4537.33 ▼37.27
Media Library /wp-admin/upload.php1,444 ▲414.47 ▲0.29109.99 ▲12.2745.08 ▲0.74

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
It is recommended to fix the following
  • This plugin does not fully uninstall, leaving 1 table in the database
    • wp_zjpas_mfczipjp_cash
  • Zombie WordPress options detected upon uninstall: 7 options
    • widget_recent-comments
    • widget_recent-posts
    • zjpas_mfczipjp_cash_version
    • db_upgraded
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
The smoke test was a success, however most plugin functionality was not tested

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
  • 10× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Notice
      Trying to get property 'prefix' of non-object in wp-content/plugins/zip-jp-postalcode-address-search/trunk/zjpas.php on line 35
    • > PHP Fatal error
      Uncaught Error: Call to undefined function load_plugin_textdomain() in wp-content/plugins/zip-jp-postalcode-address-search/zjpas.php:37
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html() in wp-content/plugins/zip-jp-postalcode-address-search/cbox_btnaddress.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html() in wp-content/plugins/zip-jp-postalcode-address-search/cbox_btnpostcode.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function load_plugin_textdomain() in wp-content/plugins/zip-jp-postalcode-address-search/trunk/zjpas.php:37
    • > PHP Notice
      Trying to get property 'prefix' of non-object in wp-content/plugins/zip-jp-postalcode-address-search/zjpas.php on line 35
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html() in wp-content/plugins/zip-jp-postalcode-address-search/cbox_text.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html() in wp-content/plugins/zip-jp-postalcode-address-search/trunk/cbox_btnpostcode.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html() in wp-content/plugins/zip-jp-postalcode-address-search/trunk/cbox_btnaddress.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html() in wp-content/plugins/zip-jp-postalcode-address-search/trunk/cbox_text.php:3

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
There were no browser issues found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
Please fix the following attributes:
  • Tags: Too many tags (11 tag instead of maximum 10); only the first 5 tags are used in your directory listing
You can take inspiration from this readme.txt

zip-jp-postalcode-address-search/zjpas.php 85% from 13 tests

The primary PHP file in "ZIP-JP Postalcode Address Search" version 2.0.0 is used by WordPress to initiate all plugin functionality
The following require your attention:
  • Description: The description should be shorter than 140 characters (currently 219 characters long)
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("zip-jp-postalcode-address-search.php" instead of "zjpas.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
No dangerous file extensions were detected1,200 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
PHP411553977
CSS130113
PO File1303073
JavaScript18037

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.23
Average class complexity52.00
▷ Minimum class complexity52.00
▷ Maximum class complexity52.00
Average method complexity4.19
▷ Minimum method complexity1.00
▷ Maximum method complexity20.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods32
▷ Static methods1237.50%
▷ Public methods32100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants4100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
14 PNG files occupy 0.80MB with 0.59MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
trunk/images/zipjptext.png8.86KB2.24KB▼ 74.67%
images/zipjptext.png8.86KB2.24KB▼ 74.67%
images/addressfinddialog.png86.15KB21.63KB▼ 74.89%
trunk/images/postcodefinddialog.png89.78KB22.83KB▼ 74.58%
images/buttons.png26.10KB8.84KB▼ 66.15%