84% world-map-hd-interactive-maps-of-the-world

Code Review | World Map HD - Interactive Maps of the World

WordPress plugin World Map HD - Interactive Maps of the World scored84%from 54 tests.

About plugin

  • Plugin page: world-map-hd-inte...
  • Plugin version: 1.0
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.1-5.5
  • WordPress version: 6.3.1
  • First release: Sep 23, 2020
  • Latest release: Sep 23, 2020
  • Number of updates: 2
  • Update frequency: N/A
  • Top authors: worldmaphd (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /429 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 gracefully, with no errors

Server metrics [RAM: ▲0.05MB] [CPU: ▼3.40ms] Passed 4 tests

A check of server-side resources used by World Map HD - Interactive Maps of the World
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0440.47 ▼5.32
Dashboard /wp-admin3.35 ▲0.0544.60 ▼7.20
Posts /wp-admin/edit.php3.40 ▲0.0547.64 ▲2.96
Add New Post /wp-admin/post-new.php5.93 ▲0.0584.07 ▼4.05
Media Library /wp-admin/upload.php3.27 ▲0.0535.98 ▲4.14

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

Filesystem and database footprint
This plugin was installed successfully
Filesystem: 14 new files
Database: no new tables, 11 new options
New WordPress options
widget_recent-posts
widget_recent-comments
widget_theysaidso_widget
WorldMapHDInputField4
widget_worldmaphd
theysaidso_admin_options
WorldMapHDInputField1
WorldMapHDInputField3
db_upgraded
WorldMapHDInputField2
...

Browser metrics Passed 4 tests

World Map HD - Interactive Maps of the World: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,815 ▲8013.36 ▼1.221.96 ▼0.0743.47 ▼6.41
Dashboard /wp-admin2,218 ▲305.86 ▼0.17103.70 ▼12.1084.12 ▲39.16
Posts /wp-admin/edit.php2,107 ▲181.98 ▼0.0737.08 ▼0.3633.45 ▼0.32
Add New Post /wp-admin/post-new.php1,537 ▲423.08 ▼0.14753.86 ▲104.1949.75 ▼9.41
Media Library /wp-admin/upload.php1,406 ▲244.17 ▼0.0596.21 ▼2.2684.72 ▲41.58

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
You still need to fix the following
  • This plugin did not uninstall successfully, leaving 11 options in the database
    • WorldMapHDInputField1
    • WorldMapHDInputField3
    • widget_recent-comments
    • db_upgraded
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_worldmaphd
    • widget_recent-posts
    • can_compress_scripts
    • WorldMapHDInputField2
    • ...

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Good news, no errors were detected

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please fix the following
  • 2× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_site_url() in wp-content/plugins/world-map-hd-interactive-maps-of-the-world/Settings.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/world-map-hd-interactive-maps-of-the-world/CustomCode.php:15

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
5 plugin tags: world, interactive map, map, maps, world map

world-map-hd-interactive-maps-of-the-world/WorldMapHD.php 92% from 13 tests

The primary PHP file in "World Map HD - Interactive Maps of the World" version 1.0 is used by WordPress to initiate all plugin functionality
Please take the time to fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("world-map-hd-interactive-maps-of-the-world.php" instead of "WorldMapHD.php")

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
Everything looks great! No dangerous files found in this plugin3,408 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript24723,201
PHP36142207

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.27
Average class complexity21.00
▷ Minimum class complexity21.00
▷ Maximum class complexity21.00
Average method complexity2.67
▷ Minimum method complexity1.00
▷ Maximum method complexity8.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods12
▷ Static methods216.67%
▷ Public methods12100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
8 PNG files occupy 0.49MB with 0.39MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
thumb.png8.27KB0.54KB▼ 93.48%
screenshot-1.png199.28KB67.24KB▼ 66.26%
phone.png6.80KB0.45KB▼ 93.35%
screenicon.png18.37KB4.46KB▼ 75.71%
screenshot-2.png87.79KB29.90KB▼ 65.94%