10% events-management

Code Review | Events Management by Dawsun

WordPress plugin Events Management by Dawsun scored10%from 54 tests.

About plugin

  • Plugin page: events-management
  • Plugin version: 1.0.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-5.1.1
  • WordPress version: 6.3.1
  • First release: Apr 16, 2017
  • Latest release: Apr 26, 2019
  • Number of updates: 16
  • Update frequency: every 46.4 days
  • Top authors: itpixelz (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

10+ active /1,293 total downloads

Benchmarks

Plugin footprint 23% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
It is recommended to fix the following installer errors
  • Install procedure validation failed for this plugin
    • > Notice in wp-content/plugins/events-management/includes/utility-functions.php+39
    Undefined index: time

Server metrics [RAM: ▼1.90MB] [CPU: ▼52.66ms] Passed 4 tests

An overview of server-side resources used by Events Management by Dawsun
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /2.09 ▼1.374.75 ▼37.71
Dashboard /wp-admin2.11 ▼1.206.13 ▼45.58
Posts /wp-admin/edit.php2.11 ▼1.256.24 ▼42.50
Add New Post /wp-admin/post-new.php2.11 ▼3.785.42 ▼84.86
Media Library /wp-admin/upload.php2.11 ▼1.126.79 ▼27.33
Bookings /wp-admin/edit.php?post_type=plugun-booking2.116.12
Email Templates /wp-admin/edit.php?post_type=plugun-template2.114.86
Event Tags /wp-admin/edit-tags.php?taxonomy=plugun-event-tags2.115.79
Tickets /wp-admin/edit.php?post_type=plugun-ticket2.115.53
Event Categories /wp-admin/edit-tags.php?taxonomy=plugun-event-category2.116.79
Settings /wp-admin/admin.php?page=deplite-setting-general2.115.71
Events /wp-admin/edit.php?post_type=plugun-event2.116.03
/wp-admin/admin.php?page=deplite-setting-template2.115.17
/wp-admin/admin.php?page=deplite-support2.116.70

Server storage [IO: ▲1.01MB] [DB: ▲0.02MB] Passed 3 tests

Filesystem and database footprint
The plugin installed successfully
Filesystem: 552 new files
Database: 1 new table, 17 new options
New tables
wp_plugun_checkin
New WordPress options
event_plugun_template_booking_done
db_upgraded
can_compress_scripts
widget_recent-posts
EVENT_PLUGUN_LICENSE_PRO
widget_recent-comments
widget_theysaidso_widget
EVENT_PLUGUN_LICENSE_FREE
theysaidso_admin_options
event_plugun_currency
...

Browser metrics Passed 4 tests

This is an overview of browser requirements for Events Management by Dawsun
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,027 ▲29213.68 ▼0.694.93 ▲3.1643.95 ▼0.42
Dashboard /wp-admin2,348 ▲1605.01 ▼0.81115.94 ▲0.6442.56 ▼2.70
Posts /wp-admin/edit.php2,177 ▲882.37 ▲0.3537.57 ▲0.8434.83 ▼2.16
Add New Post /wp-admin/post-new.php1,575 ▲6123.36 ▲5.66649.58 ▼26.6654.12 ▼3.05
Media Library /wp-admin/upload.php1,475 ▲874.43 ▲0.1997.30 ▼15.8140.96 ▼7.82
Bookings /wp-admin/edit.php?post_type=plugun-booking1,1872.3438.0927.73
Email Templates /wp-admin/edit.php?post_type=plugun-template1,8402.5243.5833.26
Event Tags /wp-admin/edit-tags.php?taxonomy=plugun-event-tags1,3292.0932.9229.32
Tickets /wp-admin/edit.php?post_type=plugun-ticket1,1762.3336.4931.16
Event Categories /wp-admin/edit-tags.php?taxonomy=plugun-event-category1,3562.1132.4326.76
Settings /wp-admin/admin.php?page=deplite-setting-general1,5602.1028.9157.26
Events /wp-admin/edit.php?post_type=plugun-event1,1812.4635.5930.11
/wp-admin/admin.php?page=deplite-setting-template1,7546.81126.18112.00
/wp-admin/admin.php?page=deplite-support9181.9728.1628.79

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
  • Uninstall procedure had uncaught errors
    • > Notice in wp-content/plugins/events-management/includes/utility-functions.php+39
    Undefined index: time
  • The plugin did not uninstall successfully, leaving 1 table in the database
    • wp_plugun_checkin
  • This plugin does not fully uninstall, leaving 13 options in the database
    • EVENT_PLUGUN_LICENSE_FREE
    • EVENT_PLUGUN_LICENSE_PRO
    • theysaidso_admin_options
    • event_plugun_template_logo
    • event_plugun_template_booking_done
    • EVENT_PLUGUN_LICENSE
    • widget_recent-posts
    • can_compress_scripts
    • widget_recent-comments
    • db_upgraded
    • ...

Smoke tests 0% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Almost there, just fix the following server-side errors
  • 13 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=deplite-support
    • > Notice in wp-content/plugins/events-management/includes/utility-functions.php+39
    Undefined index: time
  • 13 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=deplite-support
    • > Warning in wp-content/plugins/events-management/events-management-by-dawsun.php+118
    include_once(wp-content/plugins/events-management/api.php): failed to open stream: No such file or directory
  • 13 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=deplite-support
    • > Warning in wp-content/plugins/events-management/events-management-by-dawsun.php+118
    include_once(): Failed opening 'wp-content/plugins/events-management/api.php' for inclusion (include_path='.:/usr/share/php')
  • 13 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=deplite-support
    • > Notice in wp-content/plugins/events-management/includes/utility-functions.php+507
    Undefined index: export_event_id
    • > GET request to /wp-admin/admin.php?page=deplite-setting-general
    • > Notice in wp-content/plugins/events-management/admin/partials/setting-other.php+28
    Undefined index: EEK
    • > GET request to /wp-admin/admin.php?page=deplite-setting-general
    • > Notice in wp-content/plugins/events-management/admin/partials/setting-other.php+28
    Undefined index: GHC
    • > GET request to /wp-admin/admin.php?page=deplite-setting-general
    • > Notice in wp-content/plugins/events-management/admin/partials/setting-other.php+28
    Undefined index: GGP
    • > GET request to /wp-admin/admin.php?page=deplite-setting-general
    • > Notice in wp-content/plugins/events-management/admin/partials/setting-other.php+28
    Undefined index: IMP
    • > GET request to /wp-admin/admin.php?page=deplite-setting-general
    • > Notice in wp-content/plugins/events-management/admin/partials/setting-other.php+28
    Undefined index: TRL
    • > GET request to /wp-admin/admin.php?page=deplite-setting-general
    • > Notice in wp-content/plugins/events-management/admin/partials/setting-other.php+28
    Undefined index: TVD
    • > GET request to /wp-admin/admin.php?page=deplite-setting-general
    • > Notice in wp-content/plugins/events-management/admin/partials/setting-other.php+28
    Undefined index: ZWD

SRP 0% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
The following issues need your attention
  • 2× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/events-management/includes/phpqrcode/index.php
    • > /wp-content/plugins/events-management/public/partials/event-plugun-public-display.php
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/events-management/public/partials/calendar-view.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)
There are user-side issues you should fix
  • 9 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=deplite-support
    • > Console-api (warning) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1 1:28609 "jQuery.Deferred exception: $(...).live is not a function" "TypeError: $(...).live is not a function\n at HTMLDocument.\u003Canonymous> (/wp-content/plugins/events-management/admin/js/event-plugun-admin.js?ver=6.3.1:53:29)\n at e (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1:2:26990)\n at t (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1:2:27292)" undefined
  • 9 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=deplite-support
    • > Javascript (severe) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1 1:28721 Uncaught TypeError: $(...).live is not a function

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
5 plugin tags: event, event plugin, event management, ticket, event calendar

events-management/events-management-by-dawsun.php 85% from 13 tests

The main PHP script in "Events Management by Dawsun" version 1.0.2 is automatically included on every request by WordPress
You should first fix the following items:
  • Main file name: The principal plugin file should be the same as the plugin slug ("events-management.php" instead of "events-management-by-dawsun.php")
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6

Code Analysis 5% from 3 tests

File types 0% from 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
These items require your attention
  • Even if your plugin relies on executable files (for example a companion app), never distribute executable files with your plugin
    • .bat - Batch File in Windows
      • wp-content/plugins/events-management/includes/phpqrcode/tools/merge.bat
15,900 lines of code in 93 files:
LanguageFilesBlank linesComment linesLines of code
PHP773,4403,35214,809
HTML2280459
JavaScript515084321
CSS7508307
Bourne Shell1002
DOS Batch1002

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.33
Average class complexity33.03
▷ Minimum class complexity1.00
▷ Maximum class complexity310.00
Average method complexity4.04
▷ Minimum method complexity1.00
▷ Maximum method complexity41.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes59
▷ Abstract classes00.00%
▷ Concrete classes59100.00%
▷ Final classes00.00%
Methods620
▷ Static methods13421.61%
▷ Public methods50881.94%
▷ Protected methods9815.81%
▷ Private methods142.26%
Functions62
▷ Named functions4369.35%
▷ Anonymous functions1930.65%
Constants100
▷ Global constants100100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
41 compressed PNG files occupy 0.03MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
includes/phpqrcode/cache/frame_22.png0.22KB0.21KB▼ 6.19%
includes/phpqrcode/cache/frame_29.png0.23KB0.21KB▼ 7.76%
includes/phpqrcode/cache/frame_24.png0.24KB0.23KB▼ 4.55%
includes/phpqrcode/cache/frame_38.png0.27KB0.25KB▼ 8.24%
includes/phpqrcode/cache/frame_37.png0.27KB0.25KB▼ 7.89%