83% address-locator-on-image-map

Code Review | Address Locator on Image Map

WordPress plugin Address Locator on Image Map scored 83% from 54 tests.

About plugin

  • Plugin page: address-locator-o...
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress version: 5.9.2
  • First release: Jun 2, 2016
  • Latest release: Jun 17, 2016
  • Number of updates: 8
  • Update frequency: every 2.0 days
  • Top authors: atif.sparx (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 1,419 total downloads


Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.17MB] [CPU: ▼304.34ms] Passed 4 tests

An overview of server-side resources used by Address Locator on Image Map
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.77 ▲0.2556.44 ▲4.93
Dashboard /wp-admin3.60 ▲0.1934.71 ▼11.18
Posts /wp-admin/edit.php3.83 ▲0.1940.95 ▲1.50
Add New Post /wp-admin/post-new.php7.07 ▲0.1090.49 ▼1,207.30
Media Library /wp-admin/upload.php3.49 ▲0.1925.32 ▼0.36
All Store /wp-admin/edit.php?post_type=office3.5930.76
Setting /wp-admin/edit.php?post_type=office&page=store-setting3.4623.18
Add new Store /wp-admin/post-new.php?post_type=office3.9641.88

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

Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 30 new files
Database: no new tables, 2 new options
New WordPress options

Browser metrics Passed 4 tests

Address Locator on Image Map: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,809 ▲8715.73 ▼0.225.89 ▲0.182.39 ▼0.02
Dashboard /wp-admin2,933 ▲756.26 ▲0.09117.56 ▼24.10179.07 ▼31.03
Posts /wp-admin/edit.php2,732 ▲443.24 ▼0.0163.08 ▼7.81140.15 ▼9.44
Add New Post /wp-admin/post-new.php1,711 ▼4918.95 ▲2.04370.27 ▼60.26195.53 ▲35.10
Media Library /wp-admin/upload.php1,731 ▲335.56 ▲0.10146.12 ▲6.13212.27 ▲27.05
All Store /wp-admin/edit.php?post_type=office1,4133.1562.23117.80
Setting /wp-admin/edit.php?post_type=office&page=store-setting1,1393.0153.99128.44
Add new Store /wp-admin/post-new.php?post_type=office3,3304.1279.78174.18

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
The following items require your attention
  • This plugin does not fully uninstall, leaving 2 options in the database

Smoke tests 75% 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 take a closer look at the following
  • 5× 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/address-locator-on-image-map/admin/class-cpt.php:9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/address-locator-on-image-map/admin/class-store-filter.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/address-locator-on-image-map/coustom_function.php:28
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/address-locator-on-image-map/admin/class-setting.php:7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/address-locator-on-image-map/public/class-shortcode.php:13

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine on the user side


Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
Attributes that need to be fixed:
  • Donate link: Invalid URI ("")
  • Requires at least: Invalid version format
You can take inspiration from this readme.txt

address-locator-on-image-map/address_locator_on_ Image_map.php 92% from 13 tests

The main PHP script in "Address Locator on Image Map" version 1.0.0 is automatically included on every request by WordPress
Please make the necessary changes and fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("address-locator-on-image-map.php" instead of "address_locator_on_ Image_map.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Good job! No executable or dangerous file extensions detected2,492 lines of code in 16 files:
LanguageFilesBlank linesComment linesLines of code

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.37
Average class complexity14.33
▷ Minimum class complexity1.00
▷ Maximum class complexity42.00
Average method complexity4.33
▷ Minimum method complexity1.00
▷ Maximum method complexity13.00
Code structure
▷ Abstract classes00.00%
▷ Concrete classes6100.00%
▷ Final classes00.00%
▷ Static methods28.33%
▷ Public methods24100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
▷ Named functions4100.00%
▷ Anonymous functions00.00%
▷ Global constants7100.00%
▷ Class constants00.00%
▷ Public constants00.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
10 PNG files occupy 0.07MB with 0.02MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
public/assets/images/marker.png1.14KB0.22KB▼ 80.91%
public/assets/images/select-arrow.png1.25KB0.31KB▼ 74.90%