83% wp-mapgrip

Code Review | WP MAPGrip

WordPress plugin WP MAPGrip scored 83% from 54 tests.

About plugin

  • Plugin page: wp-mapgrip
  • Plugin version: 1.0.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.7.5
  • WordPress version: 5.8.1
  • First release: Jan 8, 2018
  • Latest release: Jan 9, 2018
  • Number of updates: 14
  • Update frequency: every 0.3 days
  • Top authors: sandymapgrip (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 305 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.09MB] [CPU: ▼138.61ms] Passed 4 tests

This is a short check of server-side resources used by WP MAPGrip
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /2.91 ▲0.1940.64 ▲20.67
Dashboard /wp-admin3.13 ▲0.0848.37 ▲3.13
Posts /wp-admin/edit.php3.24 ▲0.1436.70 ▼5.92
Add New Post /wp-admin/post-new.php5.49 ▲0.0696.18 ▼555.56
Media Library /wp-admin/upload.php3.07 ▲0.0735.41 ▲3.90

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

Filesystem and database footprint
This plugin was installed successfully
Filesystem: 22 new files
Database: no new tables, 4 new options
New WordPress options
mapgrip_api_url
mapgrip_width
mapgrip_embed_url
mapgrip_height

Browser metrics Passed 4 tests

A check of browser resources used by WP MAPGrip
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,811 ▲21516.17 ▲0.6114.47 ▲3.9348.33 ▲0.65
Dashboard /wp-admin2,997 ▲666.15 ▲0.14156.83 ▼4.57109.12 ▼1.93
Posts /wp-admin/edit.php2,763 ▲242.72 ▲0.0265.28 ▼3.3993.72 ▲7.00
Add New Post /wp-admin/post-new.php1,690 ▲719.16 ▲0.70399.81 ▼10.49108.05 ▼1.62
Media Library /wp-admin/upload.php1,834 ▲275.04 ▲0.01153.88 ▲4.38120.31 ▲3.96

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
These items require your attention
  • Zombie WordPress options were found after uninstall: 4 options
    • mapgrip_embed_url
    • mapgrip_api_url
    • mapgrip_height
    • mapgrip_width

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)
Even though no errors were found, this is by no means an exhaustive test

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 take a closer look at the following
  • 2× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/wp-mapgrip/public/partials/mapgrip-public-display.php
    • > /wp-content/plugins/wp-mapgrip/admin/partials/mapgrip-admin-display.php

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 87% from 29 tests

readme.txt 88% 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
Please fix the following attributes:
  • Screenshots: Please a description for screenshot #1 in wp-mapgrip/assets to your readme.txt
  • Plugin Name: Please replace "Plugin Name" with the name of your plugin on the first line ( === wp-mapgrip === )
Please take inspiration from this readme.txt

wp-mapgrip/mapgrip.php 85% from 13 tests

The main PHP file in "WP MAPGrip" ver. 1.0.2 adds more information about the plugin and also serves as the entry point for this plugin
Please take the time to fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("wp-mapgrip.php" instead of "mapgrip.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 | There should be no dangerous file extensions present in any WordPress plugin
Good job! No executable or dangerous file extensions detected346 lines of code in 16 files:
LanguageFilesBlank linesComment linesLines of code
PHP12169582336
JavaScript24546
CSS2084

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.17
Average class complexity3.43
▷ Minimum class complexity1.00
▷ Maximum class complexity14.00
Average method complexity1.55
▷ Minimum method complexity1.00
▷ Maximum method complexity9.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods31
▷ Static methods26.45%
▷ Public methods2683.87%
▷ Protected methods00.00%
▷ Private methods516.13%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
No PNG images were found in this plugin