73% interactive-geo-maps

Code Review | Interactive Geo Maps

WordPress plugin Interactive Geo Maps scored73%from 54 tests.

About plugin

  • Plugin page: interactive-geo-maps
  • Plugin version: 1.6.9.1
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.3
  • WordPress version: 6.3.1
  • First release: Oct 28, 2019
  • Latest release: Nov 28, 2023
  • Number of updates: 80
  • Update frequency: every 18.7 days
  • Top authors: carlosmoreirapt (78.75%)pcarvalho (22.5%)

Code review

54 tests

User reviews

48 reviews

Install metrics

30,000+ active /327,556 total downloads

Benchmarks

Plugin footprint 64% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Install script ran successfully

Server metrics [RAM: ▲6.67MB] [CPU: ▲38.70ms] 50% from 4 tests

Server-side resources used by Interactive Geo Maps
Please take the time to fix the following items
  • RAM: Try to keep total memory usage under 10MB (currently 10.23MB on /wp-admin/admin.php?page=freemius)
  • Extra RAM: Try to keep extra memory usage under 5MB (currently 6.67MB on /wp-admin/admin.php?page=freemius)
PageMemory (MB)CPU Time (ms)
Home /9.88 ▲6.4181.23 ▲38.87
Dashboard /wp-admin10.06 ▲6.7194.21 ▲20.60
Posts /wp-admin/edit.php10.18 ▲6.81101.66 ▲52.70
Add New Post /wp-admin/post-new.php12.73 ▲6.83140.81 ▲42.61
Media Library /wp-admin/upload.php9.98 ▲6.7587.62 ▲55.16
Freemius Debug [v.2.6.0] /wp-admin/admin.php?page=freemius10.2376.55

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 716 new files
Database: no new tables, 10 new options
New WordPress options
db_upgraded
fs_debug_mode
theysaidso_admin_options
widget_recent-comments
widget_theysaidso_widget
can_compress_scripts
fs_active_plugins
interactive-maps
fs_accounts
widget_recent-posts

Browser metrics Passed 4 tests

Checking browser requirements for Interactive Geo Maps
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,827 ▲9114.34 ▼0.371.59 ▼0.0826.75 ▼17.88
Dashboard /wp-admin2,229 ▲515.54 ▼0.1397.18 ▼17.7946.02 ▼2.12
Posts /wp-admin/edit.php2,135 ▲322.03 ▲0.0340.71 ▲3.3639.51 ▲1.77
Add New Post /wp-admin/post-new.php6,193 ▲4,66619.84 ▼3.34860.29 ▲225.1652.24 ▲4.04
Media Library /wp-admin/upload.php1,437 ▲404.17 ▼0.0699.06 ▼0.8147.20 ▲5.81
Freemius Debug [v.2.6.0] /wp-admin/admin.php?page=freemius1,0991.6526.0726.80

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
  • The plugin did not uninstall gracefully
    • > Notice in wp-content/plugins/interactive-geo-maps/vendor/freemius/wordpress-sdk/includes/class-freemius.php+8546
    Undefined property: stdClass::$plugins
  • Zombie WordPress options were found after uninstall: 10 options
    • theysaidso_admin_options
    • widget_recent-comments
    • fs_debug_mode
    • widget_recent-posts
    • can_compress_scripts
    • db_upgraded
    • fs_active_plugins
    • fs_accounts
    • widget_theysaidso_widget
    • interactive-maps

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Good news, no errors were detected

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
  • 83× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit\\Framework\\TestCase' not found in wp-content/plugins/interactive-geo-maps/vendor/hassankhan/config/tests/Writer/PropertiesTest.php:8
    • > PHP Fatal error
      Uncaught Error: Interface 'Saltus\\WP\\Framework\\Infrastructure\\Service\\Actionable' not found in wp-content/plugins/interactive-geo-maps/vendor/saltus/framework/src/Features/DragAndDrop/UpdateMenuDragAndDrop.php:10
    • > PHP Fatal error
      Uncaught Error: Class 'Noodlehaus\\AbstractConfig' not found in wp-content/plugins/interactive-geo-maps/vendor/hassankhan/config/src/Config.php:21
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit\\Framework\\TestCase' not found in wp-content/plugins/interactive-geo-maps/vendor/hassankhan/config/tests/Parser/PropertiesTest.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit_Framework_TestCase' not found in wp-content/plugins/interactive-geo-maps/vendor/hassankhan/config/tests/FileParser/PhpTest.php:9
    • > PHP Fatal error
      Uncaught Error: Interface 'Saltus\\WP\\Framework\\Infrastructure\\Container\\Container' not found in wp-content/plugins/interactive-geo-maps/vendor/saltus/framework/src/Infrastructure/Container/ServiceContainer.php:29
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit\\Framework\\TestCase' not found in wp-content/plugins/interactive-geo-maps/vendor/hassankhan/config/tests/Parser/JsonTest.php:11
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit\\Framework\\TestCase' not found in wp-content/plugins/interactive-geo-maps/vendor/hassankhan/config/tests/Writer/JsonTest.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'Saltus\\WP\\Framework\\Models\\BaseModel' not found in wp-content/plugins/interactive-geo-maps/vendor/saltus/framework/src/Models/Taxonomy.php:4
    • > PHP Fatal error
      Uncaught Error: Class 'Noodlehaus\\Writer\\AbstractWriter' not found in wp-content/plugins/interactive-geo-maps/vendor/hassankhan/config/src/Writer/Serialize.php:10

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 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
5 plugin tags: us map, travel map, world map, interactive map, map

interactive-geo-maps/interactive-geo-maps.php 92% from 13 tests

The main file in "Interactive Geo Maps" v. 1.6.9.1 serves as a complement to information provided in readme.txt and as the entry point to the plugin
Please make the necessary changes and fix the following:
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 293 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
No dangerous file extensions were detected147,678 lines of code in 562 files:
LanguageFilesBlank linesComment linesLines of code
PHP34513,54523,25858,157
JavaScript398,0753,72133,545
PO File3513,00214,59328,734
Sass602,0789511,794
CSS441,1111,06611,555
JSON11002,332
Markdown72620654
TypeScript26181362
HTML1480314
XML73457180
INI54027
YAML30021
SVG3003

PHP code 50% from 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
These items need your attention
  • Cyclomatic complexity of classes has to be reduced to less than 1000 (currently 3,096)
Cyclomatic complexity
Average complexity per logical line of code0.59
Average class complexity29.51
▷ Minimum class complexity1.00
▷ Maximum class complexity3,096.00
Average method complexity4.31
▷ Minimum method complexity1.00
▷ Maximum method complexity94.00
Code structure
Namespaces34
Interfaces22
Traits0
Classes218
▷ Abstract classes94.13%
▷ Concrete classes20995.87%
▷ Final classes146.70%
Methods2,132
▷ Static methods33115.53%
▷ Public methods1,61375.66%
▷ Protected methods954.46%
▷ Private methods42419.89%
Functions147
▷ Named functions12887.07%
▷ Anonymous functions1912.93%
Constants161
▷ Global constants9860.87%
▷ Class constants6339.13%
▷ Public constants63100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
18 compressed PNG files occupy 0.60MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/imgs/world_map_us_divided_states-600x300.png29.99KB30.21KB0.00%
assets/imgs/live_filter_map_wordpress-600x300.png36.11KB36.16KB0.00%
assets/imgs/map_heatmap_wordpress_usmap-600x300.png54.03KB54.04KB0.00%
assets/imgs/icon-128x128.png5.35KB4.49KB▼ 16.13%
assets/imgs/interactive_europe_map_with_legend_wordpress-600x300.png24.46KB24.46KB0.00%