72% event-calendar-with-map-view

Code Review | Event Calendar With Map View(ECWMV)

WordPress plugin Event Calendar With Map View(ECWMV) scored 72% from 54 tests.

About plugin

  • Plugin page: event-calendar-wi...
  • Plugin version: 0.6
  • PHP version: 7.4.16
  • WordPress compatibility: 3.8-4.4
  • WordPress version: 6.3.1
  • First release: Dec 22, 2015
  • Latest release: Feb 23, 2016
  • Number of updates: 14
  • Update frequency: every 4.6 days
  • Top authors: harshpandya (100%)

Code review

54 tests

User reviews

5 reviews

Install metrics

70+ active / 6,543 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▼0.65MB] [CPU: ▼16.37ms] Passed 4 tests

Server-side resources used by Event Calendar With Map View(ECWMV)
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0640.75 ▼4.09
Dashboard /wp-admin3.36 ▲0.0553.91 ▲4.68
Posts /wp-admin/edit.php3.41 ▲0.0550.11 ▼0.64
Add New Post /wp-admin/post-new.php3.14 ▼2.7537.24 ▼65.41
Media Library /wp-admin/upload.php3.28 ▲0.0536.53 ▲5.98
Settings /wp-admin/edit.php?post_type=ecwmv-event&page=ecwmv-settings3.3129.78
Add New /wp-admin/post-new.php?post_type=ecwmv-event3.2837.06
All Events /wp-admin/edit.php?post_type=ecwmv-event3.3238.84
Event Category /wp-admin/edit-tags.php?taxonomy=ecwmv-category&post_type=ecwmv-event3.2733.24

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

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 39 new files
Database: no new tables, 15 new options
New WordPress options
widget_recent-comments
ecwmv_theme_style
ecwmv_default_settings
ecwmv_curr_symbol
ecwmv_map_zoom
widget_ecwmv_widget
ecwmv_map_center_lat
widget_recent-posts
theysaidso_admin_options
ecwmv_meta_fields
...

Browser metrics Passed 4 tests

An overview of browser requirements for Event Calendar With Map View(ECWMV)
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,844 ▲10913.43 ▼0.867.45 ▲5.6236.38 ▼16.55
Dashboard /wp-admin2,241 ▲504.91 ▼1.05147.34 ▲40.9154.71 ▲7.95
Posts /wp-admin/edit.php2,124 ▲352.01 ▲0.0339.44 ▲0.6736.15 ▼0.44
Add New Post /wp-admin/post-new.php1,563 ▲3523.36 ▲4.86681.25 ▼22.1254.81 ▲4.22
Media Library /wp-admin/upload.php1,423 ▲354.19 ▼0.0296.36 ▼0.0541.04 ▼2.26
Settings /wp-admin/edit.php?post_type=ecwmv-event&page=ecwmv-settings9452.0724.6526.47
Add New /wp-admin/post-new.php?post_type=ecwmv-event3,50711.95311.75229.95
All Events /wp-admin/edit.php?post_type=ecwmv-event1,1101.9836.0632.35
Event Category /wp-admin/edit-tags.php?taxonomy=ecwmv-category&post_type=ecwmv-event1,2942.1325.9827.36

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • This plugin does not fully uninstall, leaving 15 options in the database
    • theysaidso_admin_options
    • ecwmv_map_center_lat
    • ecwmv_default_settings
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-comments
    • db_upgraded
    • widget_recent-posts
    • widget_ecwmv_widget
    • ecwmv_map_center_lng
    • ...

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Please fix the following server-side errors
    • > GET request to /wp-admin/edit.php?post_type=ecwmv-event&page=ecwmv-settings
    • > Notice in wp-content/plugins/event-calendar-with-map-view/settings.php+6
    Undefined index: setting_nonce
    • > GET request to /wp-admin/post-new.php?post_type=ecwmv-event
    • > Warning in wp-content/plugins/event-calendar-with-map-view/register_fields.php+19
    Use of undefined constant ecwmv_create_field - assumed 'ecwmv_create_field' (this will throw an Error in a future version of PHP)
    • > GET request to /wp-admin/post-new.php?post_type=ecwmv-event
    • > Notice in wp-content/plugins/event-calendar-with-map-view/js/location-map.php+3
    Undefined index: post

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Almost there! Just fix the following items
  • 2× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/event-calendar-with-map-view/register_widget.php:10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function sanitize_text_field() in wp-content/plugins/event-calendar-with-map-view/js/location-map.php:3

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)
These are user-side errors you should fix
    • > GET request to /wp-admin/post-new.php?post_type=ecwmv-event
    • > Console-api (warning) in unknown
    https://maps.googleapis.com/maps/api/js?v=3.exp&libraries=places 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"
    • > GET request to /wp-admin/post-new.php?post_type=ecwmv-event
    • > Console-api (warning) in unknown
    https://maps.googleapis.com/maps/api/js?v=3.exp&libraries=places 163:373 "google.maps.event.addDomListener() is deprecated, use the standard\naddEventListener() method instead:\nhttps://developer.mozilla.org/docs/Web/API/EventTarget/addEventListener\nThe feature will continue to work and there is no plan to decommission\nit."

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
Attributes that require attention:
  • Tags: Please reduce the number of tags, currently 16 tag instead of maximum 10
  • Screenshots: These screenshots have no corresponding images in /assets: #1 (Calendar View with on hover event details.), #2 (Single Page of Event with all details.), #3 (Edit Event Page on admin side.), #4 (Category add, edit and delete for events.), #5 (Event Setting page in admin side.), #6 (List View of events.), #7 (Grid View of events.), #8 (Map view with each events as marker and on click you can find info window of that event.), #9 (Event Listing Widget)
The official readme.txt is a good inspiration

event-calendar-with-map-view/index.php 92% from 13 tests

The main file in "Event Calendar With Map View(ECWMV)" v. 0.6 serves as a complement to information provided in readme.txt and as the entry point to the plugin
Please make the necessary changes and fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("event-calendar-with-map-view.php" instead of "index.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
There were no executable files found in this plugin15,105 lines of code in 26 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript63,0811,72510,228
CSS123492393,892
PHP813522985

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.23
Average class complexity14.00
▷ Minimum class complexity14.00
▷ Maximum class complexity14.00
Average method complexity4.25
▷ Minimum method complexity1.00
▷ Maximum method complexity6.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods4
▷ Static methods00.00%
▷ Public methods4100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions12
▷ Named functions12100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
11 PNG files occupy 1.41MB with 0.66MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
view/img/marker-icon.png1.53KB1.51KB▼ 0.90%
screenshot-3.png306.32KB118.79KB▼ 61.22%
screenshot-2.png209.61KB69.90KB▼ 66.65%
screenshot-8.png336.68KB141.43KB▼ 57.99%
screenshot-9.png44.63KB23.52KB▼ 47.31%