84% geo-maps

Code Review | Geo Maps - Map Block & Shortcode that support custom marker, tooltip & tooltip title

WordPress plugin Geo Maps - Map Block & Shortcode that support custom marker, tooltip & tooltip title scored84%from 54 tests.

About plugin

  • Plugin page: geo-maps
  • Plugin version: 1.0.13
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.4-6.3
  • WordPress version: 6.3.1
  • First release: Mar 26, 2022
  • Latest release: Sep 21, 2023
  • Number of updates: 15
  • Update frequency: every 36.5 days
  • Top authors: matrixaddons (100%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active /2,670 total downloads

Benchmarks

Plugin footprint 83% 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.06MB] [CPU: ▼2.92ms] Passed 4 tests

Server-side resources used by Geo Maps - Map Block & Shortcode that support custom marker, tooltip & tooltip title
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0740.10 ▼0.08
Dashboard /wp-admin3.35 ▲0.0546.70 ▼3.03
Posts /wp-admin/edit.php3.41 ▲0.0545.95 ▼1.94
Add New Post /wp-admin/post-new.php6.19 ▲0.3193.72 ▼3.90
Media Library /wp-admin/upload.php3.28 ▲0.0531.69 ▼2.80
All Maps /wp-admin/edit.php?post_type=geo-maps3.3234.25
Add New /wp-admin/post-new.php?post_type=geo-maps3.4552.63

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

A short overview of filesystem and database impact
There were no storage issued detected upon installing this plugin
Filesystem: 73 new files
Database: no new tables, 8 new options
New WordPress options
db_upgraded
widget_recent-comments
widget_theysaidso_widget
geo_maps_version
theysaidso_admin_options
geo_maps_first_install_time
can_compress_scripts
widget_recent-posts

Browser metrics Passed 4 tests

Checking browser requirements for Geo Maps - Map Block & Shortcode that support custom marker, tooltip & tooltip title
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,976 ▲23014.80 ▲0.4219.20 ▲17.4438.58 ▼2.65
Dashboard /wp-admin2,230 ▲425.81 ▲0.9399.41 ▼4.6538.86 ▼3.78
Posts /wp-admin/edit.php2,113 ▲212.06 ▲0.0333.35 ▼22.7334.90 ▼15.81
Add New Post /wp-admin/post-new.php6,216 ▲4,67419.25 ▲0.89864.17 ▲250.2036.07 ▼14.22
Media Library /wp-admin/upload.php1,412 ▲244.11 ▼0.1194.54 ▼2.5142.72 ▲1.29
All Maps /wp-admin/edit.php?post_type=geo-maps1,0131.9631.7731.06
Add New /wp-admin/post-new.php?post_type=geo-maps2,1245.2879.31103.22

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • This plugin does not fully uninstall, leaving 8 options in the database
    • widget_recent-comments
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • geo_maps_version
    • db_upgraded
    • can_compress_scripts
    • geo_maps_first_install_time
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though everything seems fine, this is not an exhaustive test

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 take a closer look at the following
  • 6× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Class 'MatrixAddons\\GeoMaps\\Admin\\Fields\\Base' not found in wp-content/plugins/geo-maps/includes/Admin/Fields/GeneralSettings.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html__() in wp-content/plugins/geo-maps/includes/Admin/Templates/Metabox/Settings.php:2
    • > PHP Fatal error
      Uncaught Error: Class 'MatrixAddons\\GeoMaps\\Admin\\Fields\\Base' not found in wp-content/plugins/geo-maps/includes/Admin/Fields/OSMProviderFields.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/geo-maps/includes/Admin/Templates/Metabox/Map.php:2
    • > PHP Fatal error
      Uncaught Error: Class 'MatrixAddons\\GeoMaps\\Admin\\Fields\\Base' not found in wp-content/plugins/geo-maps/includes/Admin/Fields/MarkerFields.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'MatrixAddons\\GeoMaps\\Admin\\Fields\\Base' not found in wp-content/plugins/geo-maps/includes/Admin/Fields/MapTypeFields.php:5

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser errors were detected

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 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
5 plugin tags: google maps, world map, maps, map block, openstreet map

geo-maps/geo-maps.php Passed 13 tests

The primary PHP file in "Geo Maps - Map Block & Shortcode that support custom marker, tooltip & tooltip title" version 1.0.13 is used by WordPress to initiate all plugin functionality
50 characters long description:
Google Map and OpenStreet Map plugin for WordPress

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
No dangerous file extensions were detected5,512 lines of code in 60 files:
LanguageFilesBlank linesComment linesLines of code
PHP477344222,297
JavaScript8109581,652
CSS319629867
Sass11380691
JSON1005

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.37
Average class complexity7.18
▷ Minimum class complexity1.00
▷ Maximum class complexity47.00
Average method complexity2.43
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces11
Interfaces0
Traits0
Classes34
▷ Abstract classes12.94%
▷ Concrete classes3397.06%
▷ Final classes13.03%
Methods151
▷ Static methods6140.40%
▷ Public methods14294.04%
▷ Protected methods31.99%
▷ Private methods63.97%
Functions15
▷ Named functions1280.00%
▷ Anonymous functions320.00%
Constants11
▷ Global constants981.82%
▷ Class constants218.18%
▷ Public constants2100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
7 PNG files occupy 0.01MB with 0.00MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/marker-shadow.png0.60KB1.16KB0.00%
assets/images/upload-image.png2.57KB1.94KB▼ 24.52%
assets/images/marker-icon.png1.65KB0.90KB▼ 45.57%
assets/images/map.png3.93KB3.62KB▼ 7.76%
assets/images/layers.png0.68KB1.05KB0.00%