83% geoplatform-maps

Code Review | GeoPlatform Maps

WordPress plugin GeoPlatform Maps scored 83% from 54 tests.

About plugin

  • Plugin page: geoplatform-maps
  • Plugin version: 1.0.11
  • PHP compatiblity: 7.2.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6.4-5.0.1
  • WordPress version: 5.9.2
  • First release: Jul 2, 2018
  • Latest release: Dec 28, 2018
  • Number of updates: 8
  • Update frequency: every 28.8 days
  • Top authors: imagemattersllc (100%)

Code review

54 tests

User reviews

1 review

Install metrics

30+ active / 616 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
This plugin's installer ran successfully

Server metrics [RAM: ▲0.10MB] [CPU: ▼293.55ms] Passed 4 tests

A check of server-side resources used by GeoPlatform Maps
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.71 ▲0.2056.20 ▲2.66
Dashboard /wp-admin3.54 ▲0.1333.55 ▲0.90
Posts /wp-admin/edit.php3.76 ▲0.1337.56 ▼1.30
Add New Post /wp-admin/post-new.php7.01 ▲0.0595.57 ▼1,167.24
Media Library /wp-admin/upload.php3.42 ▲0.1224.01 ▼6.54
GeoPlatform Maps /wp-admin/options-general.php?page=geoplatform-maps3.4022.98

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

Filesystem and database footprint
The plugin installed successfully
Filesystem: 55 new files
Database: 1 new table, no new options
New tables
wp_geop_maps_db

Browser metrics Passed 4 tests

GeoPlatform Maps: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,944 ▲19018.08 ▲2.1735.52 ▲29.262.85 ▼0.39
Dashboard /wp-admin2,901 ▲436.08 ▼0.11117.44 ▼16.54161.39 ▲4.21
Posts /wp-admin/edit.php2,700 ▲93.25 ▲0.0168.96 ▲5.63138.31 ▼5.52
Add New Post /wp-admin/post-new.php1,667 ▼8515.69 ▼5.36417.88 ▼71.17152.81 ▼1.35
Media Library /wp-admin/upload.php1,708 ▲105.57 ▲0.03140.21 ▲4.21183.48 ▲0.84
GeoPlatform Maps /wp-admin/options-general.php?page=geoplatform-maps1,1162.4454.89101.05

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
This plugin's uninstaller ran successfully

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
These errors were triggered by the plugin
    • > GET request to /wp-admin/options-general.php?page=geoplatform-maps
    • > Notice in wp-content/plugins/geoplatform-maps/admin/partials/geoplatform-maps-admin-display.php+34
    Trying to access array offset on value of type bool

SRP 0% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
The following issues need your attention
  • 1× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/geoplatform-maps/public/partials/geoplatform-maps-public-display.php
  • 3× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function sanitize_key() in wp-content/plugins/geoplatform-maps/admin/partials/geoplatform-maps-admin-add-map.php:17
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html() in wp-content/plugins/geoplatform-maps/admin/partials/geoplatform-maps-admin-display.php:26
    • > PHP Fatal error
      Uncaught Error: Call to undefined function sanitize_key() in wp-content/plugins/geoplatform-maps/admin/partials/geoplatform-maps-admin-remove-map.php:17

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
There were no browser issues found

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
9 plugin tags: open map, mapcore, shortcode, interactive, geoplatform...

geoplatform-maps/geoplatform-maps.php Passed 13 tests

The main PHP file in "GeoPlatform Maps" ver. 1.0.11 adds more information about the plugin and also serves as the entry point for this plugin
115 characters long description:
Manage your own personal database of GeoPlatform interactive maps and use shortcode to insert them into your posts.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
There were no executable files found in this plugin23,956 lines of code in 35 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript114,6245,90217,194
SVG30123,015
CSS71,023792,978
PHP14227770769

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.18
Average class complexity1.57
▷ Minimum class complexity1.00
▷ Maximum class complexity3.00
Average method complexity1.14
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods29
▷ Static methods310.34%
▷ Public methods2379.31%
▷ Protected methods00.00%
▷ Private methods620.69%
Functions9
▷ Named functions9100.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
1 PNG file occupies 0.01MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
includes/img-404.png6.60KB3.20KB▼ 51.44%