83% interactive-world-map

Code Review | Interactive World Map

WordPress plugin Interactive World Map scored83%from 54 tests.

About plugin

  • Plugin page: interactive-world...
  • Plugin version: 3.2.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.3-6.3.1
  • WordPress version: 6.3.1
  • First release: May 14, 2013
  • Latest release: Sep 25, 2023
  • Number of updates: 110
  • Update frequency: every 34.5 days
  • Top authors: html5maps (100%)

Code review

54 tests

User reviews

15 reviews

Install metrics

1,000+ active /63,634 total downloads

Benchmarks

Plugin footprint 83% 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: ▲0.23MB] [CPU: ▲3.73ms] Passed 4 tests

A check of server-side resources used by Interactive World Map
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.70 ▲0.2439.40 ▲3.60
Dashboard /wp-admin3.53 ▲0.2347.74 ▲0.66
Posts /wp-admin/edit.php3.64 ▲0.2952.02 ▲6.71
Add New Post /wp-admin/post-new.php6.11 ▲0.2395.76 ▲4.59
Media Library /wp-admin/upload.php3.45 ▲0.2338.97 ▲6.08
Detailed settings /wp-admin/admin.php?page=freeworld-html5-map-states3.6840.74
General Settings /wp-admin/admin.php?page=freeworld-html5-map-options3.7144.78
Tools /wp-admin/admin.php?page=freeworld-html5-map-tools3.5236.30
Maps /wp-admin/admin.php?page=freeworld-html5-map-maps3.4850.82
Map Preview /wp-admin/admin.php?page=freeworld-html5-map-view3.5836.66

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

A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 17 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
can_compress_scripts
db_upgraded
widget_theysaidso_widget
widget_recent-posts
theysaidso_admin_options

Browser metrics Passed 4 tests

An overview of browser requirements for Interactive World Map
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,932 ▲18613.57 ▼0.815.23 ▲3.3639.88 ▼1.40
Dashboard /wp-admin2,252 ▲695.05 ▼0.01105.81 ▲1.6939.80 ▲0.93
Posts /wp-admin/edit.php2,141 ▲522.17 ▲0.1740.55 ▲7.0033.40 ▼4.40
Add New Post /wp-admin/post-new.php1,555 ▲4117.65 ▲0.04654.51 ▼28.3757.95 ▲4.38
Media Library /wp-admin/upload.php1,440 ▲524.20 ▲0.0098.75 ▲2.6942.24 ▼2.79
Detailed settings /wp-admin/admin.php?page=freeworld-html5-map-states9672.6333.4025.74
General Settings /wp-admin/admin.php?page=freeworld-html5-map-options2,2917.03136.93115.41
Tools /wp-admin/admin.php?page=freeworld-html5-map-tools1,1071.8225.2328.93
Maps /wp-admin/admin.php?page=freeworld-html5-map-maps1,0961.7925.5736.58
Map Preview /wp-admin/admin.php?page=freeworld-html5-map-view1,0215.4890.3247.59

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-comments
    • widget_recent-posts
    • widget_theysaidso_widget
    • db_upgraded
    • theysaidso_admin_options
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Good news, no errors were detected

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
  • 6× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/interactive-world-map/freeworldcontinentmap.php:14
    • > PHP Fatal error
      Uncaught Error: Call to undefined function freeworld_html5map_plugin_get_options() in wp-content/plugins/interactive-world-map/maptools.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/interactive-world-map/bulkconfig.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function freeworld_html5map_plugin_get_options() in wp-content/plugins/interactive-world-map/editstatesconfig.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function freeworld_html5map_plugin_get_options() in wp-content/plugins/interactive-world-map/editmainconfig.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function freeworld_html5map_plugin_get_options() in wp-content/plugins/interactive-world-map/mapslist.php:4

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser issues were found

Optimizations

Plugin configuration 90% 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 your attention:
  • Tags: Please delete some tags, you are using 12 tag instead of maximum 10
The official readme.txt is a good inspiration

interactive-world-map/freeworldcontinentmap.php 85% from 13 tests

The main PHP file in "Interactive World Map" ver. 3.2.0 adds more information about the plugin and also serves as the entry point for this plugin
The following require your attention:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("interactive-world-map.php" instead of "freeworldcontinentmap.php")
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6

Code Analysis Passed 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
There were no executable files found in this plugin5,973 lines of code in 14 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript35941312,724
PHP6588362,698
CSS37111478
JSON20073

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.41
Average class complexity9.00
▷ Minimum class complexity9.00
▷ Maximum class complexity9.00
Average method complexity1.80
▷ Minimum method complexity1.00
▷ Maximum method complexity5.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods10
▷ Static methods00.00%
▷ Public methods880.00%
▷ Protected methods00.00%
▷ Private methods220.00%
Functions56
▷ Named functions56100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.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
1 compressed PNG file occupies 0.03MB
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
static/html5maps_img.png27.72KB26.12KB▼ 5.76%