84% map-engine

Code Review | Map Engine - Google Maps and Open Street Maps for WordPress

WordPress plugin Map Engine - Google Maps and Open Street Maps for WordPress scored84%from 54 tests.

About plugin

  • Plugin page: map-engine
  • Plugin version: 0.0.2
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.2
  • WordPress version: 6.3.1
  • First release: Mar 23, 2022
  • Latest release: Apr 6, 2023
  • Number of updates: 13
  • Update frequency: every 30.8 days
  • Top authors: wpvibes (69.23%)anand.au14 (38.46%)

Code review

54 tests

User reviews

5 reviews

Install metrics

100+ active /1,302 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.41MB] [CPU: ▼0.28ms] Passed 4 tests

This is a short check of server-side resources used by Map Engine - Google Maps and Open Street Maps for WordPress
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.71 ▲0.2545.68 ▼0.38
Dashboard /wp-admin3.77 ▲0.4755.89 ▼1.62
Posts /wp-admin/edit.php3.83 ▲0.4755.75 ▲5.64
Add New Post /wp-admin/post-new.php6.35 ▲0.4693.34 ▲0.35
Media Library /wp-admin/upload.php3.69 ▲0.4639.31 ▲0.51
Maps /wp-admin/edit.php?post_type=me_maps3.7340.37
Settings /wp-admin/edit.php?post_type=me_maps&page=map-engine-settings3.6136.88

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

A short overview of filesystem and database impact
This plugin was installed successfully
Filesystem: 62 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_recent-posts
theysaidso_admin_options
widget_theysaidso_widget
can_compress_scripts
widget_recent-comments

Browser metrics Passed 4 tests

An overview of browser requirements for Map Engine - Google Maps and Open Street Maps for WordPress
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,836 ▲7514.34 ▲0.071.79 ▼0.2440.95 ▼2.19
Dashboard /wp-admin2,222 ▲455.57 ▼0.0187.06 ▼7.3783.86 ▲40.51
Posts /wp-admin/edit.php2,145 ▲452.00 ▲0.0038.42 ▲2.1034.95 ▼0.02
Add New Post /wp-admin/post-new.php1,566 ▲3823.27 ▲0.23732.89 ▲112.4150.55 ▼2.32
Media Library /wp-admin/upload.php1,454 ▲544.24 ▲0.06105.47 ▼20.7077.73 ▲29.76
Maps /wp-admin/edit.php?post_type=me_maps1,1221.9733.8230.84
Settings /wp-admin/edit.php?post_type=me_maps&page=map-engine-settings1,0072.8253.7727.91

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-comments
    • widget_recent-posts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • db_upgraded
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 50% 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
Please take a closer look at the following
  • 5× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Class 'WPV_ME\\Core\\Admin' not found in wp-content/plugins/map-engine/includes/core/admin/apps/edit.php:9
    • > PHP Fatal error
      Uncaught Error: Class 'WPV_ME\\Integrations\\MapBase' not found in wp-content/plugins/map-engine/includes/integrations/google_map.php:6
    • > PHP Fatal error
      Uncaught Error: Class 'WPV_ME\\Core\\CMS' not found in wp-content/plugins/map-engine/includes/init.php:24
    • > PHP Fatal error
      Uncaught Error: Class 'WPV_ME\\Core\\Admin' not found in wp-content/plugins/map-engine/includes/core/admin/apps/settings.php:9
    • > PHP Fatal error
      Uncaught Error: Class 'WPV_ME\\Integrations\\MapBase' not found in wp-content/plugins/map-engine/includes/integrations/open_map.php:6

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There were no browser issues found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
These attributes need to be fixed:
  • Tags: Please delete some tags, you are using 12 tag instead of maximum 10
The official readme.txt is a good inspiration

map-engine/map-engine.php 92% from 13 tests

This is the main PHP file of "Map Engine - Google Maps and Open Street Maps for WordPress" version 0.0.2, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
It is important to fix the following:
  • Domain Path: The domain path folder does not exist ("/languages")

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
No dangerous file extensions were detected7,644 lines of code in 52 files:
LanguageFilesBlank linesComment linesLines of code
CSS119841094,571
PHP285832392,263
JavaScript97234757
SVG30148
JSON1005

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.41
Average class complexity18.17
▷ Minimum class complexity1.00
▷ Maximum class complexity79.00
Average method complexity3.12
▷ Minimum method complexity1.00
▷ Maximum method complexity52.00
Code structure
Namespaces7
Interfaces0
Traits0
Classes18
▷ Abstract classes15.56%
▷ Concrete classes1794.44%
▷ Final classes00.00%
Methods148
▷ Static methods5033.78%
▷ Public methods12987.16%
▷ Protected methods00.00%
▷ Private methods1912.84%
Functions3
▷ Named functions133.33%
▷ Anonymous functions266.67%
Constants13
▷ Global constants13100.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
8 compressed PNG files occupy 0.07MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
dist/images/marker-icon.2b3e1faf.png1.43KB1.55KB0.00%
assets/os-192.png19.17KB19.10KB0.38%
assets/gmap-192.png10.54KB10.38KB▼ 1.55%
dist/images/staticmap.bd03b7de.png23.87KB25.45KB0.00%
dist/images/layers-2x.8f2c4d11.png1.23KB1.67KB0.00%