83% address-locator-on-image-map

Code Review | Address Locator on Image Map

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

About plugin

  • Plugin page: address-locator-o...
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • 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,705 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Installer ran successfully

Server metrics [RAM: ▲0.18MB] [CPU: ▼8.29ms] Passed 4 tests

This is a short check of server-side resources used by Address Locator on Image Map
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.65 ▲0.1940.13 ▼2.14
Dashboard /wp-admin3.49 ▲0.1445.34 ▼14.07
Posts /wp-admin/edit.php3.60 ▲0.2545.46 ▲2.28
Add New Post /wp-admin/post-new.php6.07 ▲0.1982.27 ▼19.24
Media Library /wp-admin/upload.php3.41 ▲0.1837.41 ▲7.31
Add new Store /wp-admin/post-new.php?post_type=office3.6542.88
Setting /wp-admin/edit.php?post_type=office&page=store-setting3.3831.27
All Store /wp-admin/edit.php?post_type=office3.4535.24

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

Analyzing filesystem and database footprints of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 30 new files
Database: no new tables, 8 new options
New WordPress options
can_compress_scripts
widget_theysaidso_widget
widget_recent-posts
theysaidso_admin_options
ALIM_LOCATOR_VERSION
db_upgraded
widget_recent-comments
ALIM_LOCATOR_MAP

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 /2,833 ▲6213.19 ▼1.191.64 ▼0.5241.41 ▼6.26
Dashboard /wp-admin2,239 ▲515.85 ▼0.01101.16 ▼15.8779.92 ▲35.77
Posts /wp-admin/edit.php2,119 ▲302.06 ▲0.0637.77 ▼0.3235.82 ▲1.06
Add New Post /wp-admin/post-new.php1,549 ▲3218.23 ▲0.61640.58 ▼10.1659.79 ▲6.40
Media Library /wp-admin/upload.php1,418 ▲274.20 ▲0.0196.03 ▼5.6266.94 ▲23.03
Add new Store /wp-admin/post-new.php?post_type=office2,7912.6252.4260.73
Setting /wp-admin/edit.php?post_type=office&page=store-setting8922.2725.4431.84
All Store /wp-admin/edit.php?post_type=office1,0952.1131.8829.50

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
  • This plugin did not uninstall successfully, leaving 8 options in the database
    • ALIM_LOCATOR_VERSION
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • ALIM_LOCATOR_MAP
    • widget_recent-comments
    • widget_recent-posts
    • can_compress_scripts
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Good news, no errors were detected

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please fix the following items
  • 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-store-filter.php:6
    • > 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_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_shortcode() in wp-content/plugins/address-locator-on-image-map/public/class-shortcode.php:13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/address-locator-on-image-map/coustom_function.php:28

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
No browser issues were found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
Attributes that require attention:
  • Requires at least: Version format is invalid
  • Donate link: Please fix this invalid url: ""
The official readme.txt is a good inspiration

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

The entry point to "Address Locator on Image Map" version 1.0.0 is a PHP file that has certain tags in its header comment area
Please take the time to 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 | An overview of files in this plugin; executable files are not allowed
No dangerous file extensions were detected2,492 lines of code in 16 files:
LanguageFilesBlank linesComment linesLines of code
PHP1060831,104
JavaScript4173501,066
CSS274322

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
Great job! No cyclomatic complexity issues were detected in 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
Namespaces0
Interfaces0
Traits0
Classes6
▷ Abstract classes00.00%
▷ Concrete classes6100.00%
▷ Final classes00.00%
Methods24
▷ Static methods28.33%
▷ Public methods24100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants7
▷ Global constants7100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and 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/marker2.png0.32KB0.25KB▼ 23.01%
admin/assets/js/hv.png2.80KB7.32KB0.00%
public/assets/images/marker1.png0.33KB0.25KB▼ 25.07%
admin/assets/images/marker.png1.14KB0.22KB▼ 80.91%
admin/assets/images/imagemap_icon.png1.12KB1.36KB0.00%