73% wen-map-marker

Code Review | WEN Map Marker

WordPress plugin WEN Map Marker scored 73% from 54 tests.

About plugin

  • Plugin page: wen-map-marker
  • Plugin version: 1.3
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-4.4
  • WordPress version: 6.3.1
  • First release: Jan 13, 2015
  • Latest release: Dec 7, 2015
  • Number of updates: 17
  • Update frequency: every 19.3 days
  • Top authors: wenthemes (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

30+ active / 3,599 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
This plugin's installer ran successfully

Server metrics [RAM: ▲0.03MB] [CPU: ▼0.25ms] Passed 4 tests

This is a short check of server-side resources used by WEN Map Marker
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0339.42 ▼0.05
Dashboard /wp-admin3.34 ▲0.0446.88 ▼0.61
Posts /wp-admin/edit.php3.39 ▲0.0348.38 ▲4.90
Add New Post /wp-admin/post-new.php5.94 ▲0.0695.22 ▼2.78
Media Library /wp-admin/upload.php3.26 ▲0.0335.98 ▲2.45
Shortcode Generator /wp-admin/admin.php?page=wen-map-marker-shortcode-generator3.2631.65
WEN Map Marker /wp-admin/admin.php?page=wen-map-marker3.2631.03

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

A short overview of filesystem and database impact
There were no storage issued detected upon installing this plugin
Filesystem: 33 new files
Database: no new tables, 7 new options
New WordPress options
can_compress_scripts
widget_recent-posts
widget_recent-comments
widget_theysaidso_widget
wen_map_marker_settings
theysaidso_admin_options
db_upgraded

Browser metrics Passed 4 tests

An overview of browser requirements for WEN Map Marker
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,941 ▲20614.77 ▲0.0224.09 ▲22.4937.06 ▼1.66
Dashboard /wp-admin2,233 ▲485.85 ▲0.05108.40 ▲5.6742.23 ▲4.29
Posts /wp-admin/edit.php2,116 ▲272.04 ▼0.0139.13 ▼1.0836.56 ▼1.34
Add New Post /wp-admin/post-new.php1,672 ▲13924.09 ▲0.93703.78 ▲84.6681.19 ▲25.45
Media Library /wp-admin/upload.php1,412 ▲274.25 ▲0.04118.75 ▲18.1343.17 ▲0.27
Shortcode Generator /wp-admin/admin.php?page=wen-map-marker-shortcode-generator1,6996.89138.05104.28
WEN Map Marker /wp-admin/admin.php?page=wen-map-marker1,0102.0527.0729.02

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
It is recommended to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_recent-comments
    • db_upgraded
    • can_compress_scripts
    • widget_theysaidso_widget

Smoke tests 25% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though no errors were found, this is by no means an exhaustive test

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
Almost there! Just fix the following items
  • 2× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/wen-map-marker/public/partials/wen-map-marker-public-display.php
    • > /wp-content/plugins/wen-map-marker/admin/partials/admin-sidebar.php
  • 2× 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/wen-map-marker/admin/partials/shortcode-generator.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html() in wp-content/plugins/wen-map-marker/admin/partials/admin-settings.php:15

User-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Please take a look at the following user-side issues
    • > GET request to /wp-admin/admin.php?page=wen-map-marker-shortcode-generator
    • > Console-api (warning) in unknown
    http://maps.google.com/maps/api/js?sensor=false&libraries=places&ver=1.3 232:51 "Google Maps JavaScript API has been loaded directly without a callback. This is not supported and can lead to race conditions and suboptimal performance. For supported loading patterns please see https://goo.gle/js-api-loading"

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
These attributes need your attention:
  • Tags: Please delete some tags, you are using 19 tag instead of maximum 10
The official readme.txt might help

wen-map-marker/wen-map-marker.php Passed 13 tests

The main file in "WEN Map Marker" v. 1.3 serves as a complement to information provided in readme.txt and as the entry point to the plugin
63 characters long description:
An extremely easy way to add Google Map on the WordPress sites.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
There were no executable files found in this plugin1,280 lines of code in 23 files:
LanguageFilesBlank linesComment linesLines of code
PHP16284662683
JavaScript548143546
CSS21851

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.23
Average class complexity7.62
▷ Minimum class complexity1.00
▷ Maximum class complexity33.00
Average method complexity2.15
▷ Minimum method complexity1.00
▷ Maximum method complexity11.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes8
▷ Abstract classes00.00%
▷ Concrete classes8100.00%
▷ Final classes00.00%
Methods46
▷ Static methods24.35%
▷ Public methods4086.96%
▷ Protected methods00.00%
▷ Private methods613.04%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants4100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
3 compressed PNG files occupy 0.00MB
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
admin/images/marker_rounded_remove.png0.43KB0.39KB▼ 9.89%
admin/images/map_button.png1.00KB1.17KB0.00%
admin/images/target-icon.png0.37KB0.38KB0.00%