84% interactive-australia-map

Code Review | Interactive Australia Map

WordPress plugin Interactive Australia Map scored84%from 54 tests.

About plugin

  • Plugin page: interactive-austr...
  • 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: Nov 13, 2013
  • Latest release: Sep 25, 2023
  • Number of updates: 91
  • Update frequency: every 39.6 days
  • Top authors: html5maps (100%)

Code review

54 tests

User reviews

1 review

Install metrics

70+ active /3,754 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Install script ran successfully

Server metrics [RAM: ▲0.23MB] [CPU: ▲1.76ms] Passed 4 tests

An overview of server-side resources used by Interactive Australia Map
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.70 ▲0.2442.00 ▼0.18
Dashboard /wp-admin3.53 ▲0.2352.79 ▲6.41
Posts /wp-admin/edit.php3.64 ▲0.2956.16 ▲8.94
Add New Post /wp-admin/post-new.php6.11 ▲0.2390.00 ▼3.41
Media Library /wp-admin/upload.php3.45 ▲0.2239.75 ▲4.20
Detailed settings /wp-admin/admin.php?page=freeaustralia-html5-map-states3.6837.82
Maps /wp-admin/admin.php?page=freeaustralia-html5-map-maps3.4836.85
Tools /wp-admin/admin.php?page=freeaustralia-html5-map-tools3.5234.69
General Settings /wp-admin/admin.php?page=freeaustralia-html5-map-options3.7139.21
Map Preview /wp-admin/admin.php?page=freeaustralia-html5-map-view3.4743.22

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

A short overview of filesystem and database impact
The 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

This is an overview of browser requirements for Interactive Australia Map
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,932 ▲17514.05 ▼0.145.98 ▲3.8940.44 ▼10.18
Dashboard /wp-admin2,249 ▲645.89 ▲0.86102.94 ▲1.7341.57 ▼0.92
Posts /wp-admin/edit.php2,138 ▲462.06 ▲0.0239.14 ▲2.5737.51 ▲0.98
Add New Post /wp-admin/post-new.php1,557 ▲2423.22 ▼0.07661.63 ▲0.2362.58 ▲9.28
Media Library /wp-admin/upload.php1,431 ▲434.20 ▼0.0598.05 ▼12.3140.78 ▼6.34
Detailed settings /wp-admin/admin.php?page=freeaustralia-html5-map-states9722.5232.5729.30
Maps /wp-admin/admin.php?page=freeaustralia-html5-map-maps1,1021.8024.8628.15
Tools /wp-admin/admin.php?page=freeaustralia-html5-map-tools1,1041.8025.0629.54
General Settings /wp-admin/admin.php?page=freeaustralia-html5-map-options2,2967.04132.5475.58
Map Preview /wp-admin/admin.php?page=freeaustralia-html5-map-view1,0303.6066.6448.08

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • db_upgraded
    • can_compress_scripts
    • widget_recent-posts
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
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 items
  • 6× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function freeaustralia_html5map_plugin_get_options() in wp-content/plugins/interactive-australia-map/editstatesconfig.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function freeaustralia_html5map_plugin_get_options() in wp-content/plugins/interactive-australia-map/maptools.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function freeaustralia_html5map_plugin_get_options() in wp-content/plugins/interactive-australia-map/mapslist.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/interactive-australia-map/freeaustraliamap.php:14
    • > PHP Fatal error
      Uncaught Error: Call to undefined function freeaustralia_html5map_plugin_get_options() in wp-content/plugins/interactive-australia-map/editmainconfig.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/interactive-australia-map/bulkconfig.php:3

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 93% 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
9 plugin tags: html5 map, australia, map, interactive map, dealer map...

interactive-australia-map/freeaustraliamap.php 85% from 13 tests

The principal PHP file in "Interactive Australia Map" v. 3.1.9.2 is loaded by WordPress automatically on each request
Please take the time to fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("interactive-australia-map.php" instead of "freeaustraliamap.php")
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug

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
Good job! No executable or dangerous file extensions detected5,962 lines of code in 14 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript35941312,724
PHP6587362,677
CSS37111478
JSON20083

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
All good! No complexity issues found
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

Often times overlooked, PNG files can occupy unnecessary space in your plugin
1 compressed PNG file occupies 0.02MB
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
static/html5maps_img.png25.21KB24.03KB▼ 4.69%