94% world-map

Code Review | World Map

WordPress plugin World Map scored 94% from 54 tests.

About plugin

  • Plugin page: world-map
  • Plugin version: 1.2.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-4.9.1
  • WordPress version: 5.9.2
  • First release: Aug 24, 2017
  • Latest release: Dec 13, 2017
  • Number of updates: 16
  • Update frequency: every 7.1 days
  • Top authors: rampit (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 785 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.09MB] [CPU: ▼296.03ms] Passed 4 tests

Analyzing server-side resources used by World Map
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.69 ▲0.1770.82 ▲17.70
Dashboard /wp-admin3.53 ▲0.1135.28 ▲2.03
Posts /wp-admin/edit.php3.75 ▲0.1138.73 ▲3.18
Add New Post /wp-admin/post-new.php6.99 ▲0.0293.16 ▼1,189.60
Media Library /wp-admin/upload.php3.40 ▲0.1025.04 ▲0.26
World Map /wp-admin/admin.php?page=addmap3.3722.58
Skin /wp-admin/admin.php?page=addskin3.3522.59

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 419 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

A check of browser resources used by World Map
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,910 ▲16616.27 ▲0.6110.84 ▲5.072.58 ▲0.48
Dashboard /wp-admin2,927 ▲696.19 ▼0.07117.99 ▼18.19159.52 ▼8.10
Posts /wp-admin/edit.php2,727 ▲333.24 ▲0.0064.11 ▼1.98140.14 ▼8.48
Add New Post /wp-admin/post-new.php1,737 ▲7621.32 ▲5.55447.94 ▲20.38159.63 ▼9.10
Media Library /wp-admin/upload.php1,737 ▲395.55 ▲0.03147.54 ▲8.32189.50 ▼9.39
World Map /wp-admin/admin.php?page=addmap9902.4052.6587.96
Skin /wp-admin/admin.php?page=addskin1,0512.5455.84120.81

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
Uninstaller ran successfully

Smoke tests 75% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
These errors were triggered by the plugin
    • > GET request to /wp-admin/admin.php?page=addskin
    • > Notice in wp-content/plugins/world-map/admin/admin-master.php+31
    Undefined index: skin_name

SRP Passed 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
Everything seems fine, however this is by no means an exhaustive test

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
Attributes that need to be fixed:
  • Tags: There are too many tags (22 tag instead of maximum 10)
The official readme.txt might help

world-map/world-map.php 92% from 13 tests

The principal PHP file in "World Map" v. 1.2.1 is loaded by WordPress automatically on each request
The following require your attention:
  • Domain Path: The domain path is invalid: folder "/languages" does not exist

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Everything looks great! No dangerous files found in this plugin71,307 lines of code in 415 files:
LanguageFilesBlank linesComment linesLines of code
PHP4115,83212,21871,287
CSS20814
JavaScript24546

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.16
Average class complexity1.03
▷ Minimum class complexity1.00
▷ Maximum class complexity8.00
Average method complexity1.01
▷ Minimum method complexity1.00
▷ Maximum method complexity5.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes408
▷ Abstract classes00.00%
▷ Concrete classes408100.00%
▷ Final classes00.00%
Methods1,238
▷ Static methods00.00%
▷ Public methods1,23499.68%
▷ Protected methods00.00%
▷ Private methods40.32%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
1 PNG file occupies 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
public/image/marker_blue.png3.11KB2.20KB▼ 29.30%