78% interactive-map-of-europe

Code Review | Interactive Regional Map of Europe

WordPress plugin Interactive Regional Map of Europe scored 78% from 54 tests.

About plugin

  • Plugin page: interactive-map-o...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.4-6.2
  • WordPress version: 6.3.1
  • First release: Oct 9, 2017
  • Latest release: Apr 3, 2023
  • Number of updates: 32
  • Update frequency: every 62.6 days
  • Top authors: clickmaps (100%)

Code review

54 tests

User reviews

1 review

Install metrics

70+ active / 3,870 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
This plugin's installer ran successfully

Server metrics [RAM: ▲0.01MB] [CPU: ▼5.15ms] Passed 4 tests

Server-side resources used by Interactive Regional Map of Europe
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0138.47 ▼6.32
Dashboard /wp-admin3.32 ▲0.0144.96 ▼1.15
Posts /wp-admin/edit.php3.37 ▲0.0147.75 ▼1.53
Add New Post /wp-admin/post-new.php5.90 ▲0.0184.65 ▼11.59
Media Library /wp-admin/upload.php3.24 ▲0.0136.27 ▲3.18

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

Filesystem and database footprint
This plugin was installed successfully
Filesystem: 99 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
db_upgraded
theysaidso_admin_options
widget_recent-comments
can_compress_scripts
widget_recent-posts

Browser metrics Passed 4 tests

An overview of browser requirements for Interactive Regional Map of Europe
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,844 ▲9813.29 ▼1.101.72 ▲0.0542.31 ▲0.26
Dashboard /wp-admin2,226 ▲385.86 ▼0.03107.45 ▼5.9076.26 ▲29.47
Posts /wp-admin/edit.php2,109 ▲172.00 ▼0.0139.16 ▼1.1933.26 ▼3.35
Add New Post /wp-admin/post-new.php1,538 ▼422.98 ▲4.72790.78 ▲178.7055.65 ▲4.98
Media Library /wp-admin/upload.php1,408 ▲204.26 ▲0.10117.32 ▲18.1354.64 ▲11.99

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • can_compress_scripts
    • widget_recent-posts
    • widget_recent-comments
    • theysaidso_admin_options
    • db_upgraded
    • widget_theysaidso_widget

Smoke tests 50% 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 0% 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
  • 1× PHP files output text when accessed directly:
    • > /wp-content/plugins/interactive-map-of-europe/design/map.php
  • 3× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/interactive-map-of-europe/config.php:1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/interactive-map-of-europe/eur-map.php:80
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/interactive-map-of-europe/design/admin.php:1

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
Attributes that need to be fixed:
  • Tags: Too many tags (11 tag instead of maximum 10); only the first 5 tags are used in your directory listing
Please take inspiration from this readme.txt

interactive-map-of-europe/eur-map.php 92% from 13 tests

"Interactive Regional Map of Europe" version 1.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
Please make the necessary changes and fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("interactive-map-of-europe.php" instead of "eur-map.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Everything looks great! No dangerous files found in this plugin1,647 lines of code in 65 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript50713761
CSS8203401
PHP4247352
SVG200125
HTML1008

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.32
Average class complexity19.00
▷ Minimum class complexity19.00
▷ Maximum class complexity19.00
Average method complexity2.80
▷ Minimum method complexity1.00
▷ Maximum method complexity16.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods10
▷ Static methods00.00%
▷ Public methods990.00%
▷ Protected methods110.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
4 PNG files occupy 0.04MB with 0.01MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/icons.png15.88KB5.44KB▼ 65.72%
images/map-icon.png1.51KB0.81KB▼ 46.60%
images/map-icons.png3.93KB2.40KB▼ 38.85%
images/europe-premium.png17.25KB16.04KB▼ 7.04%