84% easy-map

Code Review | Easy Map

WordPress plugin Easy Map scored84%from 54 tests.

About plugin

  • Plugin page: easy-map
  • Plugin version: 1.3.0
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-6.4
  • WordPress version: 6.3.1
  • First release: Oct 13, 2023
  • Latest release: Dec 2, 2023
  • Number of updates: 30
  • Update frequency: every 1.7 days
  • Top authors: nashirbabu (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /374 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
Installer ran successfully

Server metrics [RAM: ▲0.12MB] [CPU: ▼0.60ms] Passed 4 tests

An overview of server-side resources used by Easy Map
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.58 ▲0.1235.16 ▼4.62
Dashboard /wp-admin3.42 ▲0.1250.92 ▲1.75
Posts /wp-admin/edit.php3.54 ▲0.1850.24 ▼0.60
Add New Post /wp-admin/post-new.php6.02 ▲0.1498.10 ▲1.17
Media Library /wp-admin/upload.php3.35 ▲0.1235.56 ▲1.67
Shortcode Sample /wp-admin/admin.php?page=easy-map-shortcode3.3132.62
Settings /wp-admin/admin.php?page=easy-map3.3133.74

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 35 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_theysaidso_widget
db_upgraded
widget_recent-posts
widget_recent-comments
theysaidso_admin_options

Browser metrics Passed 4 tests

This is an overview of browser requirements for Easy Map
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,982 ▲22014.34 ▼0.408.34 ▲6.6037.73 ▼6.91
Dashboard /wp-admin2,245 ▲685.24 ▼0.4395.87 ▼2.4343.01 ▼0.80
Posts /wp-admin/edit.php2,150 ▲502.37 ▲0.3443.57 ▲7.9733.54 ▼0.85
Add New Post /wp-admin/post-new.php1,564 ▲3823.75 ▲1.01641.62 ▲59.2430.40 ▼23.73
Media Library /wp-admin/upload.php1,447 ▲534.91 ▲0.7497.39 ▲0.1941.64 ▼1.08
Shortcode Sample /wp-admin/admin.php?page=easy-map-shortcode1,2263.5588.4253.29
Settings /wp-admin/admin.php?page=easy-map1,0962.4239.4741.68

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
These items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-posts
    • theysaidso_admin_options
    • can_compress_scripts
    • db_upgraded
    • widget_recent-comments
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please fix the following items
  • 2× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/easy-map/public/partials/easy-map-public-display.php
    • > /wp-content/plugins/easy-map/admin/partials/easy-map-admin-display.php

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser errors were detected

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
7 plugin tags: leaflet, easy map, google map, open street map, osm...

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

"Easy Map" version 1.3.0's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
46 characters long description:
A plugin for creating an Easy Map via Leaflet.

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
Good job! No executable or dangerous file extensions detected6,570 lines of code in 23 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript62762695,449
CSS45735597
PHP13183574524

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.27
Average class complexity7.25
▷ Minimum class complexity1.00
▷ Maximum class complexity37.00
Average method complexity2.67
▷ Minimum method complexity1.00
▷ Maximum method complexity25.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes8
▷ Abstract classes00.00%
▷ Concrete classes8100.00%
▷ Final classes00.00%
Methods30
▷ Static methods413.33%
▷ Public methods2583.33%
▷ Protected methods00.00%
▷ Private methods516.67%
Functions5
▷ Named functions5100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
5 compressed PNG files occupy 0.01MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/leaflet/images/marker-icon-2x.png2.41KB2.52KB0.00%
assets/leaflet/images/marker-icon.png1.43KB1.55KB0.00%
assets/leaflet/images/layers.png0.68KB1.05KB0.00%
assets/leaflet/images/layers-2x.png1.23KB1.67KB0.00%
assets/leaflet/images/marker-shadow.png0.60KB1.16KB0.00%