10% geo-my-wp

Code Review | GEO my Wordpress

WordPress plugin GEO my Wordpress scored10%from 54 tests.

About plugin

  • Plugin page: geo-my-wp
  • Plugin version: 4.1
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.6-6.4
  • WordPress version: 6.3.1
  • First release: Aug 20, 2012
  • Latest release: Nov 6, 2023
  • Number of updates: 524
  • Update frequency: every 7.8 days
  • Top authors: ninjew (100%)

Code review

54 tests

User reviews

126 reviews

Install metrics

5,000+ active /281,222 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
You still need to fix the following installer errors
  • This plugin did not install gracefully
    • > Notice in wp-content/plugins/geo-my-wp/geo-my-wp.php+417
    Trying to access array offset on value of type bool

Server metrics [RAM: ▲4.22MB] [CPU: ▲24.61ms] 75% from 4 tests

An overview of server-side resources used by GEO my Wordpress
The following require your attention
  • CPU: Try to keep total CPU usage under 500.00ms (currently 675.54ms on /wp-admin/admin.php?page=gmw-extensions)
PageMemory (MB)CPU Time (ms)
Home /6.62 ▲3.1560.39 ▲15.89
Dashboard /wp-admin7.92 ▲4.57113.05 ▲49.72
Posts /wp-admin/edit.php7.94 ▲4.5872.98 ▲25.37
Add New Post /wp-admin/post-new.php10.51 ▲4.63119.99 ▲20.41
Media Library /wp-admin/upload.php7.81 ▲4.5870.85 ▲36.78
Tools /wp-admin/admin.php?page=gmw-tools8.2466.95
Forms /wp-admin/admin.php?page=gmw-forms7.8164.12
Settings /wp-admin/admin.php?page=gmw-settings7.8268.74
Extensions & Licenses /wp-admin/admin.php?page=gmw-extensions7.90675.54
Import / Export /wp-admin/admin.php?page=gmw-import-export8.1263.03

Server storage [IO: ▲9.42MB] [DB: ▲0.02MB] Passed 3 tests

Analyzing filesystem and database footprints of this plugin
This plugin installed successfully
Filesystem: 412 new files
Database: 3 new tables, 18 new options
New tables
wp_gmw_locationmeta
wp_gmw_forms
wp_gmw_locations
New WordPress options
widget_geo_my_wp_current_location_widget
widget_recent-posts
widget_gmw_search_form_widget
gmw_extensions_updater
gmw_license_data
gmw_options
can_compress_scripts
widget_gmw_single_location_widget
gmw_addons_version
theysaidso_admin_options
...

Browser metrics Passed 4 tests

An overview of browser requirements for GEO my Wordpress
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,907 ▲14514.71 ▲0.241.61 ▼0.1040.99 ▼2.48
Dashboard /wp-admin2,309 ▲1315.58 ▼0.1095.53 ▼18.8186.23 ▲40.41
Posts /wp-admin/edit.php2,213 ▲1131.96 ▼0.0537.89 ▲0.5629.78 ▼3.03
Add New Post /wp-admin/post-new.php1,518 ▼1717.90 ▼7.40754.81 ▲47.6751.83 ▼12.04
Media Library /wp-admin/upload.php1,530 ▲1334.18 ▲0.0399.71 ▼34.0778.88 ▲23.95
Tools /wp-admin/admin.php?page=gmw-tools1,0842.0244.9264.63
Forms /wp-admin/admin.php?page=gmw-forms1,3162.3948.8848.65
Settings /wp-admin/admin.php?page=gmw-settings2,9292.8267.7381.25
Extensions & Licenses /wp-admin/admin.php?page=gmw-extensions2,9522.4247.0880.53
Import / Export /wp-admin/admin.php?page=gmw-import-export1,2022.4246.4953.54

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
These items require your attention
  • The uninstall procedure failed, leaving 3 tables in the database
    • wp_gmw_locations
    • wp_gmw_locationmeta
    • wp_gmw_forms
  • This plugin did not uninstall successfully, leaving 18 options in the database
    • widget_theysaidso_widget
    • widget_recent-posts
    • gmw_addons_status
    • gmw_addons_data
    • gmw_options
    • gmw_forms_table_updated
    • gmw_license_data
    • gmw_db_version
    • can_compress_scripts
    • gmw_extensions_updater
    • ...

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting 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 fix the following items
  • 128× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Notice
      Undefined variable: address_ph in wp-content/plugins/geo-my-wp/plugins/bp-profile-search-geolocation/templates/bps-fields/members/bps-form-sweetdate-horizontal.php on line 54
    • > PHP Fatal error
      Uncaught Error: Call to undefined function gmw_form_class() in wp-content/plugins/geo-my-wp/plugins/members-locator/templates/search-results/responsive-2/content.php:25
    • > PHP Fatal error
      Uncaught Error: Call to undefined function do_action() in wp-content/plugins/geo-my-wp/plugins/posts-locator/templates/search-results/responsive-1/no-results.php:24
    • > PHP Fatal error
      Uncaught Error: Call to undefined function gmw_form_class() in wp-content/plugins/geo-my-wp/plugins/posts-locator/templates/search-results/responsive-3/content.php:24
    • > PHP Fatal error
      Uncaught Error: Call to undefined function do_action() in wp-content/plugins/geo-my-wp/plugins/posts-locator/templates/search-results/responsive-3/results.php:25
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/geo-my-wp/includes/location-form/templates/form-fields/hidden-field.php:1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function do_action() in wp-content/plugins/geo-my-wp/plugins/members-locator/templates/info-window/popup/right-white/content.php:19
    • > PHP Fatal error
      Uncaught Error: Call to undefined function do_action() in wp-content/plugins/geo-my-wp/plugins/members-locator/templates/info-window/popup/slide-left/content.php:25
    • > PHP Fatal error
      Uncaught Error: Call to undefined function bp_nouveau_member_hook() in wp-content/plugins/geo-my-wp/plugins/members-locator/templates/search-results/buddyboss/single-result.php:27
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/geo-my-wp/includes/location-form/templates/form-fields/loader-field.php:1

User-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
These are user-side errors you should fix
    • > GET request to /wp-admin/admin.php?page=gmw-tools
    • > Javascript (severe) in unknown
    /wp-admin/admin.php?page=gmw-tools 17:4 Uncaught ReferenceError: jQuery is not defined
    • > GET request to /wp-admin/admin.php?page=gmw-extensions
    • > Network (severe)
    https://geomywp.com/wp-content/uploads/extensions-images/icons/bp_xprofile_geolocation_icon.svg?v=11 - Failed to load resource: the server responded with a status of 404 ()
    • > GET request to /wp-admin/admin.php?page=gmw-extensions
    • > Network (severe)
    https://geomywp.com/wp-content/uploads/extensions-images/icons/gmw_kleo_geolocation_icon.svg?v=11 - Failed to load resource: the server responded with a status of 404 ()

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
These attributes need to be fixed:
  • Tags: Please reduce the number of tags, currently 26 tag instead of maximum 10
Please take inspiration from this readme.txt

geo-my-wp/geo-my-wp.php 92% from 13 tests

This is the main PHP file of "GEO my Wordpress" version 4.1, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
Please take the time to fix the following:
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 237 characters long)

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Everything looks great! No dangerous files found in this plugin110,070 lines of code in 338 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript4714,30216,36647,846
PHP22313,34820,90937,031
CSS602,6322,52713,769
PO File45,42412,14510,387
JSON100740
Markdown1560173
SVG21090124

PHP code 50% from 2 tests

Analyzing cyclomatic complexity and code structure
Please fix the following
  • Method cyclomatic complexity should be reduced to less than 100 (currently 134)
Cyclomatic complexity
Average complexity per logical line of code0.39
Average class complexity35.06
▷ Minimum class complexity1.00
▷ Maximum class complexity235.00
Average method complexity5.38
▷ Minimum method complexity1.00
▷ Maximum method complexity134.00
Code structure
Namespaces3
Interfaces0
Traits3
Classes106
▷ Abstract classes10.94%
▷ Concrete classes10599.06%
▷ Final classes00.00%
Methods849
▷ Static methods18822.14%
▷ Public methods77991.76%
▷ Protected methods455.30%
▷ Private methods252.94%
Functions459
▷ Named functions459100.00%
▷ Anonymous functions00.00%
Constants32
▷ Global constants1650.00%
▷ Class constants1650.00%
▷ Public constants16100.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
38 compressed PNG files occupy 0.19MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/markerclusters/m5.png6.68KB5.10KB▼ 23.66%
assets/lib/leaflet/images/marker-icon.png1.43KB1.55KB0.00%
assets/images/spotlight-hdpi.png1.60KB1.70KB0.00%
assets/images/layers-2x.png1.23KB1.67KB0.00%
assets/images/chosen-sprite@2x.png0.85KB0.83KB▼ 3.10%