83% interactive-uk-map

Code Review | Interactive UK Map

WordPress plugin Interactive UK Map scored83%from 54 tests.

About plugin

  • Plugin page: interactive-uk-map
  • Plugin version: 3.1.9.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.3-6.3.1
  • WordPress version: 6.3.1
  • First release: Jul 22, 2013
  • Latest release: Sep 25, 2023
  • Number of updates: 101
  • Update frequency: every 36.8 days
  • Top authors: html5maps (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

100+ active /5,715 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.22MB] [CPU: ▼3.32ms] Passed 4 tests

Analyzing server-side resources used by Interactive UK Map
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.75 ▲0.2446.20 ▲5.96
Dashboard /wp-admin3.57 ▲0.1955.57 ▼8.02
Posts /wp-admin/edit.php3.69 ▲0.2956.22 ▲2.07
Add New Post /wp-admin/post-new.php6.16 ▲0.2392.03 ▼13.28
Media Library /wp-admin/upload.php3.50 ▲0.2343.25 ▲6.46
Tools /wp-admin/admin.php?page=freeukregions-html5-map-tools3.5642.45
Maps /wp-admin/admin.php?page=freeukregions-html5-map-maps3.5243.09
Map Preview /wp-admin/admin.php?page=freeukregions-html5-map-view3.5840.22
General Settings /wp-admin/admin.php?page=freeukregions-html5-map-options3.7644.21
Detailed settings /wp-admin/admin.php?page=freeukregions-html5-map-states3.7249.58

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 17 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
can_compress_scripts
widget_theysaidso_widget
widget_recent-posts
widget_recent-comments
theysaidso_admin_options

Browser metrics Passed 4 tests

This is an overview of browser requirements for Interactive UK Map
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,921 ▲13513.40 ▼0.988.14 ▲6.1642.38 ▼1.31
Dashboard /wp-admin2,247 ▲705.62 ▼0.0489.38 ▼2.8140.36 ▼1.17
Posts /wp-admin/edit.php2,149 ▲522.18 ▲0.1639.61 ▲2.9437.13 ▲1.60
Add New Post /wp-admin/post-new.php1,566 ▲3823.43 ▲0.28618.12 ▼93.8852.47 ▼1.77
Media Library /wp-admin/upload.php1,449 ▲494.22 ▼0.02103.83 ▲1.9641.43 ▼1.49
Tools /wp-admin/admin.php?page=freeukregions-html5-map-tools1,1121.7527.0431.02
Maps /wp-admin/admin.php?page=freeukregions-html5-map-maps1,1081.7426.0730.15
Map Preview /wp-admin/admin.php?page=freeukregions-html5-map-view1,1234.7294.1457.47
General Settings /wp-admin/admin.php?page=freeukregions-html5-map-options2,3057.08138.65102.00
Detailed settings /wp-admin/admin.php?page=freeukregions-html5-map-states1,0132.5231.8729.14

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
You still need to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-posts
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please fix the following
  • 6× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function freeukregions_html5map_plugin_get_options() in wp-content/plugins/interactive-uk-map/maptools.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function freeukregions_html5map_plugin_get_options() in wp-content/plugins/interactive-uk-map/editstatesconfig.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function freeukregions_html5map_plugin_get_options() in wp-content/plugins/interactive-uk-map/mapslist.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function freeukregions_html5map_plugin_get_options() in wp-content/plugins/interactive-uk-map/editmainconfig.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/interactive-uk-map/freeukregionsmap.php:14
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/interactive-uk-map/bulkconfig.php:3

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
No browser errors were detected

Optimizations

Plugin configuration 90% from 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
10 plugin tags: dealer map, svg map, html5 map, united kingdom, map...

interactive-uk-map/freeukregionsmap.php 77% from 13 tests

The main file in "Interactive UK Map" v. 3.1.9.2 serves as a complement to information provided in readme.txt and as the entry point to the plugin
You should first fix the following items:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("interactive-uk-map.php" instead of "freeukregionsmap.php")
  • Text Domain: The text domain is optional since WordPress version 4.6; if you do specify it, it must be the same as the plugin slug
  • Description: The description should be shorter than 140 characters (currently 143 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
No dangerous file extensions were detected6,028 lines of code in 14 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript35941312,724
PHP6588342,683
CSS37111478
JSON200143

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
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 PNG file occupies 0.08MB with 0.05MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
static/html5maps_img.png83.61KB31.77KB▼ 62.00%