84% map-pins

Code Review | Map pins

WordPress plugin Map pins scored 84% from 54 tests.

About plugin

  • Plugin page: map-pins
  • Plugin version: 1.29
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.5-4.9.8
  • WordPress version: 5.8.1
  • First release: Nov 26, 2013
  • Latest release: Sep 27, 2018
  • Number of updates: 55
  • Update frequency: every 32.4 days
  • Top authors: rvwoens (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

90+ active / 3,907 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Install script ran successfully

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

Analyzing server-side resources used by Map pins
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.04 ▲0.3239.84 ▲12.24
Dashboard /wp-admin3.27 ▲0.2240.64 ▼7.67
Posts /wp-admin/edit.php3.38 ▲0.2748.47 ▼1.26
Add New Post /wp-admin/post-new.php5.63 ▲0.1992.65 ▼574.19
Media Library /wp-admin/upload.php3.21 ▲0.2137.82 ▲1.80
Locations /wp-admin/admin.php?page=mappins-menu-markers3.1833.69
Settings /wp-admin/admin.php?page=mappins-menu-settings3.1827.94
Help /wp-admin/admin.php?page=mappins-menu-help3.1832.55

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

Analyzing filesystem and database footprints of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 338 new files
Database: 1 new table, no new options
New tables
wp_mappins_markers

Browser metrics Passed 4 tests

This is an overview of browser requirements for Map pins
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,732 ▲13616.32 ▲1.077.33 ▼3.6549.90 ▼3.12
Dashboard /wp-admin3,017 ▲836.17 ▲0.24143.66 ▼0.51132.70 ▲4.58
Posts /wp-admin/edit.php2,811 ▲722.71 ▲0.0268.23 ▼1.67117.81 ▲22.35
Add New Post /wp-admin/post-new.php1,644 ▼3919.03 ▲0.31405.02 ▼6.45131.27 ▲16.75
Media Library /wp-admin/upload.php1,802 ▼55.04 ▲0.02134.19 ▼29.31156.53 ▲29.14
Locations /wp-admin/admin.php?page=mappins-menu-markers1,1112.0953.5268.95
Settings /wp-admin/admin.php?page=mappins-menu-settings3,4942.2165.84176.16
Help /wp-admin/admin.php?page=mappins-menu-help1,1592.2157.9968.73

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
It is recommended to fix the following
  • Zombie tables were found after uninstall: 1 table
    • wp_mappins_markers

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
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
Almost there! Just fix the following items
  • 5× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/map-pins/map-pins.php
    • > /wp-content/plugins/map-pins/include/marker.php
    • > /wp-content/plugins/map-pins/include/xcos.php
    • > /wp-content/plugins/map-pins/include/xcos_country.php
    • > /wp-content/plugins/map-pins/include/mappins.php

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 97% 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
These attributes need your attention:
  • Tags: There are too many tags (23 tag instead of maximum 10)
The official readme.txt might help

map-pins/map-pins.php Passed 13 tests

The main PHP file in "Map pins" ver. 1.29 adds more information about the plugin and also serves as the entry point for this plugin
46 characters long description:
Show pins on a map from an admin defined table

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
No dangerous file extensions were detected3,329 lines of code in 13 files:
LanguageFilesBlank linesComment linesLines of code
PO File26046191,240
PHP57787903
JavaScript528114677
CSS1128509

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.29
Average class complexity18.50
▷ Minimum class complexity1.00
▷ Maximum class complexity40.00
Average method complexity2.75
▷ Minimum method complexity1.00
▷ Maximum method complexity12.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods40
▷ Static methods2357.50%
▷ Public methods40100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants5
▷ Global constants5100.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
320 PNG files occupy 0.35MB with 0.09MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
pics/markers/black_airport.png1.17KB0.87KB▼ 25.40%
pics/markers/brown_bench.png1.56KB1.32KB▼ 15.31%
pics/markers/blue_mine.png1.36KB0.96KB▼ 28.89%
pics/markers/brown_entrance.png0.85KB0.61KB▼ 28.80%
pics/markers/red_stadium.png1.44KB1.06KB▼ 26.32%