94% address-geocoder

Code Review | Address Geocoder

WordPress plugin Address Geocoder scored 94% from 54 tests.

About plugin

  • Plugin page: address-geocoder
  • Plugin version: 1.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.8-5.1
  • WordPress version: 5.9.2
  • First release: May 16, 2012
  • Latest release: Jan 23, 2019
  • Number of updates: 28
  • Update frequency: every 87.4 days
  • Top authors: MartySpellerberg (67.86%)mgibbs189 (35.71%)

Code review

54 tests

User reviews

7 reviews

Install metrics

1,000+ active / 12,548 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed gracefully, with no errors

Server metrics [RAM: ▼0.22MB] [CPU: ▼301.51ms] Passed 4 tests

A check of server-side resources used by Address Geocoder
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0171.66 ▲14.16
Dashboard /wp-admin3.43 ▲0.0237.55 ▼1.23
Posts /wp-admin/edit.php3.65 ▲0.0142.79 ▲0.31
Add New Post /wp-admin/post-new.php6.05 ▼0.9283.88 ▼1,204.04
Media Library /wp-admin/upload.php3.31 ▲0.0124.91 ▼1.09
Address Geocoder /wp-admin/options-general.php?page=address-geocoder-options3.2726.32

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 6 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

This is an overview of browser requirements for Address Geocoder
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,799 ▲4515.98 ▼0.107.42 ▲0.082.83 ▼0.01
Dashboard /wp-admin2,897 ▲396.17 ▲0.01117.26 ▼17.67161.21 ▲6.52
Posts /wp-admin/edit.php2,696 ▲23.24 ▼0.0163.85 ▼2.51140.23 ▼6.84
Add New Post /wp-admin/post-new.php1,793 ▲12217.94 ▼3.60402.40 ▼48.99164.60 ▲3.48
Media Library /wp-admin/upload.php1,706 ▲115.52 ▲0.02148.17 ▲4.33196.91 ▲5.73
Address Geocoder /wp-admin/options-general.php?page=address-geocoder-options1,1972.4154.93114.03

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Uninstall script ran successfully

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
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please take a closer look at the following
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/address-geocoder/address-geocoder.php:20

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
Attributes that need to be fixed:
  • Screenshots: Please add images for these screenshots: #1 (The meta box before clicking "Geocode"), #2 (The meta box after clicking "Geocode"), #3 (The settings page)
Please take inspiration from this readme.txt

address-geocoder/address-geocoder.php Passed 13 tests

The main file in "Address Geocoder" v. 1.0.1 serves as a complement to information provided in readme.txt and as the entry point to the plugin
36 characters long description:
Attach location information to posts

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
There were no executable files found in this plugin230 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP15746172
JavaScript112358

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.45
Average class complexity33.00
▷ Minimum class complexity33.00
▷ Maximum class complexity33.00
Average method complexity4.20
▷ Minimum method complexity1.00
▷ Maximum method complexity9.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods10
▷ Static methods00.00%
▷ Public methods10100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
3 PNG files occupy 0.14MB with 0.11MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
(invalid) screenshot-3.png45.06KB0.00KB▼ 100.00%
screenshot-1.png33.43KB13.32KB▼ 60.14%
screenshot-2.png67.07KB24.93KB▼ 62.83%