61% mapster-wp-maps

Code Review | Mapster WP Maps

WordPress plugin Mapster WP Maps scored61%from 54 tests.

About plugin

  • Plugin page: mapster-wp-maps
  • Plugin version: 1.2.38
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0.0-6.2
  • WordPress version: 6.3.1
  • First release: Oct 2, 2021
  • Latest release: Nov 6, 2023
  • Number of updates: 728
  • Update frequency: every 1.1 days
  • Top authors: mapster (100%)

Code review

54 tests

User reviews

30 reviews

Install metrics

1,000+ active /22,680 total downloads

Benchmarks

Plugin footprint 63% from 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▲10.17MB] [CPU: ▲85.44ms] 25% from 4 tests

An overview of server-side resources used by Mapster WP Maps
The following require your attention
  • RAM: Try to keep total memory usage under 10MB (currently 13.64MB on /wp-admin/edit-tags.php?taxonomy=wp-map-category&post_type=mapster-wp-map)
  • CPU: Total CPU usage should be kept under 500.00ms (currently 2,147.48ms on /wp-admin/edit.php?post_type=mapster-wp-map&page=wordpress-maps-settings)
  • Extra RAM: Extra memory usage should kept under 5MB (currently 10.17MB on /wp-admin/edit-tags.php?taxonomy=wp-map-category&post_type=mapster-wp-map)
PageMemory (MB)CPU Time (ms)
Home /13.38 ▲9.91118.34 ▲77.85
Dashboard /wp-admin13.54 ▲10.19145.49 ▲80.30
Posts /wp-admin/edit.php13.60 ▲10.24143.43 ▲95.85
Add New Post /wp-admin/post-new.php16.90 ▲11.01181.52 ▲87.76
Media Library /wp-admin/upload.php13.57 ▲10.34132.24 ▲97.47
Polygons /wp-admin/edit.php?post_type=mapster-wp-polygon13.54117.97
Popup Templates /wp-admin/edit.php?post_type=mapster-wp-popup13.66130.03
Add New /wp-admin/post-new.php?post_type=mapster-wp-map14.65187.73
Map Categories /wp-admin/edit-tags.php?taxonomy=wp-map-category&post_type=mapster-wp-map13.64138.48
Maps /wp-admin/edit.php?post_type=mapster-wp-map13.53138.05
Locations /wp-admin/edit.php?post_type=mapster-wp-location13.54119.01
Lines /wp-admin/edit.php?post_type=mapster-wp-line13.53122.41
Freemius Debug [v.2.5.10] /wp-admin/admin.php?page=freemius13.67114.00
Settings /wp-admin/edit.php?post_type=mapster-wp-map&page=wordpress-maps-settings13.732,147.48
Categories /wp-admin/edit-tags.php?taxonomy=wp-map-category&post_type=mapster-wp-map13.64128.64

Server storage [IO: ▲35.95MB] [DB: ▲0.03MB] 67% from 3 tests

Filesystem and database footprint
Please fix the following
  • The filesystem usage should be lower than 25MB (currently using 35.95MB)
Filesystem: 1,262 new files
Database: no new tables, 16 new options
New WordPress options
db_upgraded
mapster_default_image_text
fs_debug_mode
fs_active_plugins
mapster_settings_page
post_type_rules_flushed_mapster_wp_maps
acf_version
mapster_welcome_message
can_compress_scripts
fs_accounts
...

Browser metrics Passed 4 tests

A check of browser resources used by Mapster WP Maps
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,964 ▲20214.43 ▲0.091.66 ▼0.1829.89 ▼12.26
Dashboard /wp-admin2,327 ▲1525.65 ▼0.10105.37 ▼8.2845.18 ▲0.62
Posts /wp-admin/edit.php2,244 ▲1442.36 ▲0.4148.67 ▲11.5136.86 ▼0.96
Add New Post /wp-admin/post-new.php6,693 ▲5,01426.15 ▲4.331,237.81 ▲569.1247.15 ▼6.11
Media Library /wp-admin/upload.php2,085 ▲6858.44 ▲4.20238.13 ▲136.8553.71 ▲10.58
Polygons /wp-admin/edit.php?post_type=mapster-wp-polygon1,2812.4540.2936.38
Popup Templates /wp-admin/edit.php?post_type=mapster-wp-popup1,9862.4752.3039.63
Add New /wp-admin/post-new.php?post_type=mapster-wp-map11,89414.271,002.45135.18
Map Categories /wp-admin/edit-tags.php?taxonomy=wp-map-category&post_type=mapster-wp-map2,3168.65198.1742.45
Maps /wp-admin/edit.php?post_type=mapster-wp-map1,2732.4446.1237.15
Locations /wp-admin/edit.php?post_type=mapster-wp-location1,2842.4546.9338.69
Lines /wp-admin/edit.php?post_type=mapster-wp-line1,2812.4244.0738.90
Freemius Debug [v.2.5.10] /wp-admin/admin.php?page=freemius1,1982.0336.4931.17
Settings /wp-admin/edit.php?post_type=mapster-wp-map&page=wordpress-maps-settings1,2084.30126.5485.72
Categories /wp-admin/edit-tags.php?taxonomy=wp-map-category&post_type=mapster-wp-map2,3518.47182.6542.92

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • Uninstall procedure had uncaught errors
    • > Notice in wp-content/plugins/mapster-wp-maps/freemius/includes/class-freemius.php+8486
    Undefined property: stdClass::$plugins
  • Zombie WordPress options detected upon uninstall: 16 options
    • mapster_default_popup
    • fs_accounts
    • mapster_default_image_text
    • widget_recent-posts
    • can_compress_scripts
    • mapster_settings_page
    • db_upgraded
    • widget_theysaidso_widget
    • post_type_rules_flushed_mapster_wp_maps
    • fs_debug_mode
    • ...

Smoke tests 25% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 0% 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
  • 2× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/mapster-wp-maps/public/partials/mapster-wordpress-maps-public-display.php
    • > /wp-content/plugins/mapster-wp-maps/admin/includes/mapster-modal-shortcode.php
  • 101× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function acf_register_store() in wp-content/plugins/mapster-wp-maps/includes/acf/includes/acf-hook-functions.php:4
    • > PHP Fatal error
      Uncaught Error: Class 'WKT' not found in wp-content/plugins/mapster-wp-maps/includes/geo-php/lib/adapters/EWKT.class.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function load_plugin_textdomain() in wp-content/plugins/mapster-wp-maps/includes/acf-code-field/acf-code-field.php:16
    • > PHP Fatal error
      Uncaught Error: Class 'acf_field' not found in wp-content/plugins/mapster-wp-maps/includes/acf-code-field/acf-code-field-v4.php:11
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/mapster-wp-maps/includes/acf/includes/forms/form-comment.php:34
    • > PHP Fatal error
      Uncaught Error: Class 'Collection' not found in wp-content/plugins/mapster-wp-maps/includes/geo-php/lib/geometry/GeometryCollection.class.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function acf_get_setting() in wp-content/plugins/mapster-wp-maps/includes/acf/includes/admin/views/html-notice-upgrade.php:6
    • > PHP Fatal error
      Uncaught Error: Class 'acf_field' not found in wp-content/plugins/mapster-wp-maps/includes/acf/includes/fields/class-acf-field-taxonomy.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function acf_register_store() in wp-content/plugins/mapster-wp-maps/includes/acf/includes/acf-field-functions.php:4
    • > PHP Fatal error
      Uncaught Error: Class 'GeoAdapter' not found in wp-content/plugins/mapster-wp-maps/includes/geo-php/lib/adapters/KML.class.php:21

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Please fix the following browser errors
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=mapster-wp-map
    • > Rendering (warning) in unknown
    /wp-admin/post-new.php?post_type=mapster-wp-map - [.WebGL-0x26a00261ff00]GL Driver Message (OpenGL, Performance, GL_CLOSE_PATH_NV, High): GPU stall due to ReadPixels
    • > GET request to /wp-admin/post-new.php?post_type=mapster-wp-map
    • > Rendering (warning) in unknown
    /wp-admin/post-new.php?post_type=mapster-wp-map - [.WebGL-0x26a00261ff00]GL Driver Message (OpenGL, Performance, GL_CLOSE_PATH_NV, High): GPU stall due to ReadPixels (this message will no longer repeat)

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
8 plugin tags: real estate, gl js, mapbox, interactive map, map shortcode...

mapster-wp-maps/mapster-wordpress-maps.php 92% from 13 tests

Analyzing the main PHP file in "Mapster WP Maps" version 1.2.38
Please take the time to fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("mapster-wp-maps.php" instead of "mapster-wordpress-maps.php")

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Everything looks great! No dangerous files found in this plugin284,685 lines of code in 1,111 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript33613,22611,475103,662
PHP32117,76337,91973,002
PO File4334,70059,96569,173
HTML1823,7521222,363
CSS1411,4311,83915,223
Markdown103620799
SVG7411311
Pascal14316295
JSON10048
Bourne Shell1015
YAML1004

PHP code 50% from 2 tests

Analyzing cyclomatic complexity and code structure
Please tend to the following items
  • Please reduce cyclomatic complexity of classes to less than 1000 (currently 3,073)
Cyclomatic complexity
Average complexity per logical line of code0.50
Average class complexity35.46
▷ Minimum class complexity1.00
▷ Maximum class complexity3,073.00
Average method complexity3.79
▷ Minimum method complexity1.00
▷ Maximum method complexity94.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes193
▷ Abstract classes73.63%
▷ Concrete classes18696.37%
▷ Final classes00.00%
Methods2,452
▷ Static methods2078.44%
▷ Public methods1,97980.71%
▷ Protected methods431.75%
▷ Private methods43017.54%
Functions587
▷ Named functions57497.79%
▷ Anonymous functions132.21%
Constants161
▷ Global constants11470.81%
▷ Class constants4729.19%
▷ Public constants47100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
21 PNG files occupy 0.21MB with 0.07MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
freemius/assets/img/plugin-icon.png9.16KB5.26KB▼ 42.58%
includes/acf/assets/inc/select2/3/select2.png0.51KB0.99KB0.00%
public/images/icons/facebook.png2.26KB0.64KB▼ 71.87%
includes/acf/assets/inc/datepicker/images/ui-icons_ffffff_256x240.png3.68KB4.17KB0.00%
admin/images/logo-Mapster.png93.35KB36.58KB▼ 60.82%