94% image-marker

Code Review | Leaflet Maps Marker Image Extension

WordPress plugin Leaflet Maps Marker Image Extension scored 94% from 54 tests.

About plugin

  • Plugin page: image-marker
  • Plugin version: 1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.7-4.3
  • WordPress version: 5.8.1
  • First release: Jan 7, 2015
  • Latest release: Sep 22, 2015
  • Number of updates: 8
  • Update frequency: every 32.2 days
  • Top authors: neilb27 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 992 total downloads

Benchmarks

Plugin footprint Passed 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.10MB] [CPU: ▼142.48ms] Passed 4 tests

Server-side resources used by Leaflet Maps Marker Image Extension
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /2.93 ▲0.2127.93 ▲4.41
Dashboard /wp-admin3.15 ▲0.1043.08 ▼1.66
Posts /wp-admin/edit.php3.26 ▲0.1543.58 ▲0.04
Add New Post /wp-admin/post-new.php5.51 ▲0.0788.03 ▼567.94
Media Library /wp-admin/upload.php3.09 ▲0.0932.36 ▼0.36

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

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 27 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

This is an overview of browser requirements for Leaflet Maps Marker Image Extension
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,720 ▲12415.85 ▲0.477.60 ▼0.1844.06 ▼2.92
Dashboard /wp-admin2,977 ▲446.13 ▼0.07134.64 ▼13.04108.87 ▼7.42
Posts /wp-admin/edit.php2,746 ▲72.69 ▼0.0165.56 ▲3.0593.71 ▲0.41
Add New Post /wp-admin/post-new.php1,690 ▲1818.86 ▲0.07352.16 ▼11.60114.21 ▲6.46
Media Library /wp-admin/upload.php1,814 ▲45.05 ▲0.05150.40 ▼0.76110.91 ▼12.97

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The plugin uninstalled completely, with no zombie files or tables

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

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please take a closer look at the following
  • 2× PHP files output text when accessed directly:
    • > /wp-content/plugins/image-marker/public/partials/image-marker-public-display.php
    • > /wp-content/plugins/image-marker/admin/partials/image-marker-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 on the user side

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
5 plugin tags: nextgen, gallery, media, exif, maps marker

image-marker/image-marker.php Passed 13 tests

The main PHP file in "Leaflet Maps Marker Image Extension" ver. 1.1 adds more information about the plugin and also serves as the entry point for this plugin
61 characters long description:
Extension to Leaflet Maps Marker to make markers from images.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Good job! No executable or dangerous file extensions detected402 lines of code in 19 files:
LanguageFilesBlank linesComment linesLines of code
PHP15193635349
JavaScript2113253
CSS2080

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.14
Average class complexity3.30
▷ Minimum class complexity1.00
▷ Maximum class complexity8.00
Average method complexity1.62
▷ Minimum method complexity1.00
▷ Maximum method complexity8.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes10
▷ Abstract classes00.00%
▷ Concrete classes10100.00%
▷ Final classes00.00%
Methods37
▷ Static methods821.62%
▷ Public methods3081.08%
▷ Protected methods00.00%
▷ Private methods718.92%
Functions3
▷ Named functions3100.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
2 PNG files occupy 0.12MB with 0.08MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/screenshot-1.png49.66KB20.26KB▼ 59.20%
assets/screenshot-2.png76.72KB28.23KB▼ 63.20%