63% geo-mashup

Code Review | Geo Mashup

WordPress plugin Geo Mashup scored63%from 54 tests.

About plugin

  • Plugin page: geo-mashup
  • Plugin version: 1.13.12
  • PHP version: 7.4.16
  • WordPress compatibility: 3.7-6.2.2
  • WordPress version: 6.3.1
  • First release: Nov 15, 2005
  • Latest release: Jul 14, 2023
  • Number of updates: 332
  • Update frequency: every 19.4 days
  • Top authors: cyberhobo (100%)

Code review

54 tests

User reviews

33 reviews

Install metrics

4,000+ active /230,094 total downloads

Benchmarks

Plugin footprint 48% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲4.72MB] [CPU: ▲29.24ms] Passed 4 tests

This is a short check of server-side resources used by Geo Mashup
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /4.35 ▲0.8956.42 ▲13.66
Dashboard /wp-admin9.96 ▲6.6185.73 ▲18.77
Posts /wp-admin/edit.php9.96 ▲6.6093.23 ▲43.52
Add New Post /wp-admin/post-new.php10.69 ▲4.80145.69 ▲41.00
Media Library /wp-admin/upload.php9.96 ▲6.7376.06 ▲44.06
Freemius Debug [v.2.5.10] /wp-admin/admin.php?page=freemius9.9671.01
Geo Mashup /wp-admin/options-general.php?page=geo-mashup/geo-mashup.php9.9671.14

Server storage [IO: ▲6.62MB] [DB: ▲0.01MB] Passed 3 tests

Filesystem and database footprint
The plugin installed successfully
Filesystem: 490 new files
Database: 3 new tables, 11 new options
New tables
wp_geo_mashup_location_relationships
wp_geo_mashup_locations
wp_geo_mashup_administrative_names
New WordPress options
widget_recent-comments
db_upgraded
geo_mashup_db_version
fs_active_plugins
widget_theysaidso_widget
geo_mashup_activation_log
fs_debug_mode
theysaidso_admin_options
can_compress_scripts
fs_accounts
...

Browser metrics Passed 4 tests

An overview of browser requirements for Geo Mashup
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,812 ▲5114.27 ▼0.121.79 ▼0.0330.96 ▼12.92
Dashboard /wp-admin2,221 ▲415.65 ▲0.0893.83 ▼0.8342.78 ▲4.03
Posts /wp-admin/edit.php2,124 ▲272.02 ▲0.0640.52 ▲1.0139.11 ▲5.69
Add New Post /wp-admin/post-new.php1,770 ▲24421.72 ▼1.56723.87 ▲68.4766.57 ▲13.50
Media Library /wp-admin/upload.php1,423 ▲234.19 ▲0.0294.99 ▼8.4949.11 ▲1.46
Freemius Debug [v.2.5.10] /wp-admin/admin.php?page=freemius1,0781.8224.4528.81
Geo Mashup /wp-admin/options-general.php?page=geo-mashup/geo-mashup.php9861.8929.1766.21

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • Uninstall procedure validation failed for this plugin
    • > Notice in wp-content/plugins/geo-mashup/vendor/freemius/wordpress-sdk/includes/class-freemius.php+8486
    Undefined property: stdClass::$plugins
  • The uninstall procedure failed, leaving 3 tables in the database
    • wp_geo_mashup_administrative_names
    • wp_geo_mashup_locations
    • wp_geo_mashup_location_relationships
  • This plugin does not fully uninstall, leaving 9 options in the database
    • fs_active_plugins
    • fs_accounts
    • fs_debug_mode
    • widget_recent-posts
    • can_compress_scripts
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

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

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please fix the following
  • 31× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'GeoMashup\\Options\\SingleMap' not found in wp-content/plugins/geo-mashup/php/Options/GlobalMap.php:12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/geo-mashup/geo-mashup-ui-managers.php:429
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/geo-mashup/shortcodes.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_basename() in wp-content/plugins/geo-mashup/geo-mashup.php:253
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/geo-mashup/php/Widgets/Search.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/geo-mashup/default-templates/info-window.php:16
    • > PHP Notice
      Undefined variable: geo_mashup_search in wp-content/plugins/geo-mashup/default-templates/nearby-list.php on line 32
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/geo-mashup/default-templates/search-results.php:35
    • > PHP Fatal error
      Uncaught Error: Call to undefined function status_header() in wp-content/plugins/geo-mashup/geo-query.php:266
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/geo-mashup/default-templates/search-form.php:21

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
These attributes need to be fixed:
  • Donate link: Invalid URI found ("")
The official readme.txt might help

geo-mashup/geo-mashup.php 85% from 13 tests

The main PHP file in "Geo Mashup" ver. 1.13.12 adds more information about the plugin and also serves as the entry point for this plugin
Please take the time to fix the following:
  • Text Domain: The text domain should only use lowercase characters and dashes
  • Description: Please don't use more than 140 characters for the plugin description (currently 153 characters long)

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Everything looks great! No dangerous files found in this plugin76,142 lines of code in 320 files:
LanguageFilesBlank linesComment linesLines of code
PHP1859,51920,73541,803
PO File2810,17012,44023,029
JavaScript571,8943,5759,836
CSS27156100932
SVG2000288
Markdown1680214
JSON20040

PHP code 50% from 2 tests

Analyzing cyclomatic complexity and code structure
Please fix the following
  • Cyclomatic complexity of classes has to be reduced to less than 1000 (currently 3,073)
Cyclomatic complexity
Average complexity per logical line of code0.57
Average class complexity56.74
▷ Minimum class complexity1.00
▷ Maximum class complexity3,073.00
Average method complexity4.53
▷ Minimum method complexity1.00
▷ Maximum method complexity94.00
Code structure
Namespaces7
Interfaces0
Traits0
Classes101
▷ Abstract classes43.96%
▷ Concrete classes9796.04%
▷ Final classes00.00%
Methods1,624
▷ Static methods39424.26%
▷ Public methods1,16771.86%
▷ Protected methods332.03%
▷ Private methods42426.11%
Functions106
▷ Named functions10397.17%
▷ Anonymous functions32.83%
Constants154
▷ Global constants10568.18%
▷ Class constants4931.82%
▷ Public constants49100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
75 compressed PNG files occupy 0.23MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/ui-icons_222222_256x240.png4.27KB4.11KB▼ 3.78%
images/mm_20_black.png0.30KB0.38KB0.00%
images/ui-bg_highlight-soft_75_cccccc_1x100.png0.10KB0.17KB0.00%
images/ui-icons_454545_256x240.png4.27KB4.11KB▼ 3.78%
images/mm_20_aqua.png0.55KB0.58KB0.00%