68% wpgmap

Code Review | WPGMAP

WordPress plugin WPGMAP scored68%from 54 tests.

About plugin

  • Plugin page: wpgmap
  • Plugin version: 1.0.1
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Jul 8, 2021
  • Latest release: Jul 10, 2021
  • Number of updates: 11
  • Update frequency: every 0.4 days
  • Top authors: hadiwp (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /430 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Install script ran successfully

Server metrics [RAM: ▲0.14MB] [CPU: ▲0.39ms] Passed 4 tests

A check of server-side resources used by WPGMAP
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.58 ▲0.1243.80 ▲2.62
Dashboard /wp-admin3.50 ▲0.2057.19 ▲3.56
Posts /wp-admin/edit.php3.56 ▲0.2054.92 ▲0.78
Add New Post /wp-admin/post-new.php6.02 ▲0.1489.95 ▲1.72
Media Library /wp-admin/upload.php3.35 ▲0.1234.71 ▼3.57
Upgrade to PRO /wp-admin/admin.php?page=wp-gmap&view=upgrade3.3437.92
Settings /wp-admin/admin.php?page=wp-gmap&view=settings3.3539.13
Add New Map /wp-admin/admin.php?page=wp-gmap&view=add-map3.7235.84
WPGMAP /wp-admin/admin.php?page=wp-gmap3.3537.88
Add New Settings /wp-admin/admin.php?page=wp-gmap&view=add-settings3.3936.45

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

Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 42 new files
Database: 2 new tables, 6 new options
New tables
wp_gmap_settings
wp_gmap_data
New WordPress options
widget_recent-posts
db_upgraded
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-comments
can_compress_scripts

Browser metrics Passed 4 tests

Checking browser requirements for WPGMAP
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,969 ▲18314.88 ▲0.562.06 ▼0.1047.51 ▲3.49
Dashboard /wp-admin2,371 ▲1976.23 ▲0.70112.67 ▲11.9040.67 ▼7.29
Posts /wp-admin/edit.php2,299 ▲1993.35 ▲1.3249.25 ▲11.4130.72 ▼3.37
Add New Post /wp-admin/post-new.php1,559 ▲3323.23 ▼0.40664.04 ▼86.1038.19 ▼16.12
Media Library /wp-admin/upload.php1,430 ▲304.19 ▲0.0382.93 ▼33.8444.79 ▼4.64
Upgrade to PRO /wp-admin/admin.php?page=wp-gmap&view=upgrade1,0993.0438.9826.63
Settings /wp-admin/admin.php?page=wp-gmap&view=settings9973.0138.7325.29
Add New Map /wp-admin/admin.php?page=wp-gmap&view=add-map7211.6810.0424.56
WPGMAP /wp-admin/admin.php?page=wp-gmap1,0003.0237.7824.25
Add New Settings /wp-admin/admin.php?page=wp-gmap&view=add-settings1,3253.0042.1426.51

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
  • Zombie tables detected upon uninstall: 2 tables
    • wp_gmap_data
    • wp_gmap_settings
  • Zombie WordPress options detected upon uninstall: 6 options
    • db_upgraded
    • widget_recent-posts
    • widget_theysaidso_widget
    • widget_recent-comments
    • theysaidso_admin_options
    • can_compress_scripts

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
The smoke test was a success, however most plugin functionality was not tested

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
  • 12× GET requests to PHP files return non-empty strings (only 10 are shown):
    • > /wp-content/plugins/wpgmap/src/views/add-map.php
    • > /wp-content/plugins/wpgmap/src/views/update-map.php
    • > /wp-content/plugins/wpgmap/src/views/settings-submission.php
    • > /wp-content/plugins/wpgmap/src/views/map-submission.php
    • > /wp-content/plugins/wpgmap/src/views/partials/map-form.php
    • > /wp-content/plugins/wpgmap/src/views/partials/settings-form.php
    • > /wp-content/plugins/wpgmap/wpgmap.php
    • > /wp-content/plugins/wpgmap/src/views/home.php
    • > /wp-content/plugins/wpgmap/src/views/update-settings.php
    • > /wp-content/plugins/wpgmap/src/views/gmap.php
  • 3× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html() in wp-content/plugins/wpgmap/src/views/upgrade.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'WpGmap\\core\\model\\Model' not found in wp-content/plugins/wpgmap/src/core/model/MapSettings.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'WpGmap\\core\\model\\Model' not found in wp-content/plugins/wpgmap/src/core/model/MapData.php:7

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine on the user side

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
8 plugin tags: wpgmap, wpgooglemap, polygon marker, map, polyline marker...

wpgmap/wpgmap.php Passed 13 tests

The entry point to "WPGMAP" version 1.0.1 is a PHP file that has certain tags in its header comment area
27 characters long description:
Wordpress Google Map plugin

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Good job! No executable or dangerous file extensions detected3,898 lines of code in 40 files:
LanguageFilesBlank linesComment linesLines of code
PHP345831892,962
JavaScript2980493
CSS2892423
JSON20020

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.70
Average class complexity8.80
▷ Minimum class complexity1.00
▷ Maximum class complexity47.00
Average method complexity2.12
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces5
Interfaces0
Traits0
Classes15
▷ Abstract classes00.00%
▷ Concrete classes15100.00%
▷ Final classes00.00%
Methods105
▷ Static methods4240.00%
▷ Public methods10095.24%
▷ Protected methods00.00%
▷ Private methods54.76%
Functions3
▷ Named functions133.33%
▷ Anonymous functions266.67%
Constants11
▷ Global constants763.64%
▷ Class constants436.36%
▷ Public constants4100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
PNG images were not found in this plugin