79% modest-map

Code Review | Modest Map

WordPress plugin Modest Map scored79%from 54 tests.

About plugin

  • Plugin page: modest-map
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-6.1
  • WordPress version: 6.3.1
  • First release: Dec 27, 2022
  • Latest release: Dec 27, 2022
  • Number of updates: 6
  • Update frequency: N/A
  • Top authors: implgeo (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /410 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
This plugin's installer ran successfully

Server metrics [RAM: ▲0.06MB] [CPU: ▼1.35ms] Passed 4 tests

Server-side resources used by Modest Map
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0639.67 ▼1.09
Dashboard /wp-admin3.36 ▲0.0645.76 ▼0.26
Posts /wp-admin/edit.php3.47 ▲0.1250.26 ▼1.22
Add New Post /wp-admin/post-new.php5.96 ▲0.0792.36 ▲3.23
Media Library /wp-admin/upload.php3.28 ▲0.0535.06 ▼2.83

Server storage [IO: ▲15.03MB] [DB: ▲0.07MB] Passed 3 tests

How much does this plugin use your filesystem and database?
This plugin installed successfully
Filesystem: 89 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
theysaidso_admin_options
db_upgraded
can_compress_scripts
widget_theysaidso_widget
widget_recent-posts

Browser metrics Passed 4 tests

An overview of browser requirements for Modest Map
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /4,377 ▲1,64215.70 ▲1.391.91 ▼0.3242.29 ▼3.50
Dashboard /wp-admin3,749 ▲1,5645.94 ▲0.07144.79 ▲41.4140.92 ▲2.45
Posts /wp-admin/edit.php3,311 ▲1,2193.71 ▲1.7161.31 ▲16.6635.82 ▼4.29
Add New Post /wp-admin/post-new.php2,697 ▲1,15517.19 ▼1.33604.10 ▼31.9330.99 ▼23.99
Media Library /wp-admin/upload.php2,119 ▲7404.49 ▲0.26112.74 ▲15.5643.68 ▲0.49

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • theysaidso_admin_options
    • db_upgraded
    • can_compress_scripts
    • widget_recent-comments
    • widget_theysaidso_widget
    • widget_recent-posts

Smoke tests 50% 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)
Good news, no errors were detected

SRP 0% 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
Please take a closer look at the following
  • 1× PHP files output text when accessed directly:
    • > /wp-content/plugins/modest-map/public/partials/modest-map-public-display.php
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_js() in wp-content/plugins/modest-map/admin/partials/modest-map-admin-display.php:47

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

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
4 plugin tags: openstreetmap, map, gdpr, maps

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

This is the main PHP file of "Modest Map" version 1.0.0, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
48 characters long description:
Self-hosted GDPR compliant map without tracking.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
No dangerous file extensions were detected6,557 lines of code in 23 files:
LanguageFilesBlank linesComment linesLines of code
JSON2004,274
JavaScript47671,386
CSS35530576
PHP13137483304
Markdown14017

PHP code Passed 2 tests

Analyzing 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.12
Average class complexity1.62
▷ Minimum class complexity1.00
▷ Maximum class complexity3.00
Average method complexity1.19
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes8
▷ Abstract classes00.00%
▷ Concrete classes8100.00%
▷ Final classes00.00%
Methods26
▷ Static methods311.54%
▷ Public methods2180.77%
▷ Protected methods00.00%
▷ Private methods519.23%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.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
7 compressed PNG files occupy 0.25MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
admin/css/images/marker-icon-2x.png2.41KB2.52KB0.00%
public/style/sprite.png72.73KB31.50KB▼ 56.68%
admin/css/images/marker-shadow.png0.60KB1.16KB0.00%
admin/css/images/layers-2x.png1.23KB1.67KB0.00%
admin/css/images/marker-icon.png1.43KB1.55KB0.00%