67% open-user-map

Code Review | Open User Map

WordPress plugin Open User Map scored67%from 54 tests.

About plugin

  • Plugin page: open-user-map
  • Plugin version: 1.3.32
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.5-6.4
  • WordPress version: 6.3.1
  • First release: Oct 4, 2021
  • Latest release: Nov 27, 2023
  • Number of updates: 156
  • Update frequency: every 5.0 days
  • Top authors: 100plugins (100%)

Code review

54 tests

User reviews

39 reviews

Install metrics

3,000+ active /45,257 total downloads

Benchmarks

Plugin footprint 64% 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: ▲5.61MB] [CPU: ▲32.28ms] 75% from 4 tests

An overview of server-side resources used by Open User Map
It is recommended to improve the following
  • Extra RAM: Extra memory usage should kept under 5MB (currently 5.61MB on /wp-admin/admin.php?page=freemius)
PageMemory (MB)CPU Time (ms)
Home /9.27 ▲5.8069.33 ▲26.27
Dashboard /wp-admin9.29 ▲5.9887.04 ▲35.10
Posts /wp-admin/edit.php9.29 ▲5.9390.94 ▲44.05
Add New Post /wp-admin/post-new.php10.62 ▲4.72121.81 ▲25.73
Media Library /wp-admin/upload.php9.29 ▲6.0575.70 ▲42.02
Freemius Debug [v.2.6.0] /wp-admin/admin.php?page=freemius9.2970.92

Server storage [IO: ▲30.92MB] [DB: ▲0.00MB] 67% from 3 tests

How much does this plugin use your filesystem and database?
These are issues you should consider
  • The filesystem usage should be lower than 25MB (currently using 30.92MB)
Filesystem: 321 new files
Database: no new tables, 9 new options
New WordPress options
can_compress_scripts
fs_active_plugins
fs_accounts
db_upgraded
fs_debug_mode
widget_recent-comments
widget_theysaidso_widget
widget_recent-posts
theysaidso_admin_options

Browser metrics Passed 4 tests

An overview of browser requirements for Open User Map
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,986 ▲22414.64 ▼0.081.62 ▲0.0027.96 ▼16.11
Dashboard /wp-admin2,385 ▲2056.34 ▲0.73124.28 ▲39.8647.18 ▲8.51
Posts /wp-admin/edit.php2,322 ▲2223.52 ▲1.5056.48 ▲18.9236.00 ▲0.43
Add New Post /wp-admin/post-new.php1,574 ▲4822.96 ▼0.64675.68 ▲37.1933.08 ▼21.01
Media Library /wp-admin/upload.php1,453 ▲504.39 ▲0.1983.25 ▼15.9245.53 ▲4.20
Freemius Debug [v.2.6.0] /wp-admin/admin.php?page=freemius1,3013.2047.5431.53

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
The following items require your attention
  • Uninstall procedure had uncaught errors
    • > Notice in wp-content/plugins/open-user-map/freemius/includes/class-freemius.php+8546
    Undefined property: stdClass::$plugins
  • This plugin does not fully uninstall, leaving 9 options in the database
    • widget_recent-comments
    • theysaidso_admin_options
    • fs_active_plugins
    • can_compress_scripts
    • widget_theysaidso_widget
    • fs_accounts
    • fs_debug_mode
    • widget_recent-posts
    • db_upgraded

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though no errors were found, this is by no means an exhaustive test

SRP 0% 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
  • 1× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/open-user-map/open-user-map.php
  • 28× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Notice
      Undefined variable: oum_map_height in wp-content/plugins/open-user-map/templates/partial-map-render.php on line 134
    • > PHP Fatal error
      Uncaught Error: Class 'OpenUserMapPlugin\\Base\\BaseController' not found in wp-content/plugins/open-user-map/inc/Base/TaxController.php:9
    • > PHP Fatal error
      Uncaught Error: Class 'OpenUserMapPlugin\\Base\\BaseController' not found in wp-content/plugins/open-user-map/inc/Base/Enqueue.php:10
    • > PHP Fatal error
      Uncaught Error: Class 'OpenUserMapPlugin\\Base\\BaseController' not found in wp-content/plugins/open-user-map/inc/Pages/Settings.php:10
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/open-user-map/templates/block-add-user-location.php:1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/open-user-map/templates/page-backend-add-region.php:4
    • > PHP Fatal error
      Uncaught Error: Class 'OpenUserMapPlugin\\Base\\BaseController' not found in wp-content/plugins/open-user-map/inc/Pages/Frontend.php:9
    • > PHP Fatal error
      Uncaught Error: Class 'Elementor\\Widget_Base' not found in wp-content/plugins/open-user-map/elementor/includes/widgets/open-user-map-widget.php:4
    • > PHP Notice
      Undefined variable: oum_map_height in wp-content/plugins/open-user-map/templates/partial-map-render.php on line 134
    • > PHP Fatal error
      Uncaught Error: Class 'OpenUserMapPlugin\\Base\\BaseController' not found in wp-content/plugins/open-user-map/inc/Base/LocationController.php:9

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
5 plugin tags: leaflet, map, interactive map, regions, mapbox

open-user-map/open-user-map.php 92% from 13 tests

This is the main PHP file of "Open User Map" version 1.3.32, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
It is important to fix the following:
  • Description: Please don't use more than 140 characters for the plugin description (currently 301 characters long)

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Everything looks great! No dangerous files found in this plugin83,542 lines of code in 217 files:
LanguageFilesBlank linesComment linesLines of code
PHP1569,08818,26139,606
JavaScript285,9317,53520,698
JSON50016,697
CSS23105793,794
Sass2479422,741
SVG3006

PHP code 50% from 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
Please fix the following
  • Cyclomatic complexity of classes should be reduced to less than 1000 (currently 3,096)
Cyclomatic complexity
Average complexity per logical line of code0.60
Average class complexity71.22
▷ Minimum class complexity1.00
▷ Maximum class complexity3,096.00
Average method complexity4.53
▷ Minimum method complexity1.00
▷ Maximum method complexity94.00
Code structure
Namespaces6
Interfaces1
Traits0
Classes68
▷ Abstract classes22.94%
▷ Concrete classes6697.06%
▷ Final classes23.03%
Methods1,397
▷ Static methods23616.89%
▷ Public methods99271.01%
▷ Protected methods191.36%
▷ Private methods38627.63%
Functions116
▷ Named functions10691.38%
▷ Anonymous functions108.62%
Constants148
▷ Global constants9866.22%
▷ Class constants5033.78%
▷ Public constants50100.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
49 PNG files occupy 24.87MB with 10.41MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/map_style_MapBox.satellite.png2,971.86KB1,076.16KB▼ 63.79%
assets/images/map_style_Custom2.png1,405.53KB583.69KB▼ 58.47%
src/leaflet/images/marker-icon_default.png2.57KB1.55KB▼ 39.60%
src/leaflet/images/_marker-icon-2x.png2.41KB2.52KB0.00%
assets/images/ico_twitter_50x50.png2.62KB1.38KB▼ 47.51%