10% easy-event-calendar

Code Review | Easy Event calendar

WordPress plugin Easy Event calendar scored 10% from 54 tests.

About plugin

  • Plugin page: easy-event-calendar
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.6-5.7.1
  • WordPress version: 5.8.1
  • First release: Apr 26, 2021
  • Latest release: Apr 27, 2021
  • Number of updates: 2
  • Update frequency: every 127.5 days
  • Top authors: corefortress (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 335 total downloads

Benchmarks

Plugin footprint 23% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
These installer errors require your attention
  • Install procedure validation failed for this plugin
    • > Notice in wp-content/plugins/easy-event-calendar/src/functions.php+1215
    Undefined index: settings-updated

Server metrics [RAM: ▼0.42MB] [CPU: ▼186.25ms] Passed 4 tests

An overview of server-side resources used by Easy Event calendar
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.21 ▲0.4914.00 ▼10.37
Dashboard /wp-admin3.22 ▲0.1715.10 ▼35.67
Posts /wp-admin/edit.php3.23 ▲0.1213.24 ▼33.58
Add New Post /wp-admin/post-new.php3.22 ▼2.2112.99 ▼652.17
Media Library /wp-admin/upload.php3.22 ▲0.2213.28 ▼23.57
Settings /wp-admin/admin.php?page=coreftCalendar-settings3.2310.34
Color Settings /wp-admin/admin.php?page=coreftCalendar-special3.2310.98
Calendars /wp-admin/admin.php?page=coreftCalendar-admin3.2312.96
Venues /wp-admin/edit.php?post_type=coreft-venues3.2313.17
Events /wp-admin/edit.php?post_type=coreft-events3.2312.33
Shortcodes /wp-admin/admin.php?page=coreftCalendar-custom-shortcodes3.2311.74
Organizers /wp-admin/edit.php?post_type=coreft-organizers3.2310.83
Categories /wp-admin/edit-tags.php?taxonomy=coreft_events_category3.2312.61

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 179 new files
Database: 6 new tables, 6 new options
New tables
wp_coreftcalendar_special_dates_calendar
wp_coreftcalendar_special_dates
wp_coreftcalendar_calendars
wp_coreftcalendar_subscribers_calendar
wp_coreftcalendar_booking
wp_coreftCalendar_booking
New WordPress options
widget_eventscalendaraccordion
widget_eventscalendar
coreftCalendar_options
widget_eventscalendaraddevents
widget_eventscalendartodayevents
widget_eventscalendarupcomingevents

Browser metrics Passed 4 tests

Easy Event calendar: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,942 ▲34616.11 ▲0.519.91 ▼0.4444.90 ▼5.28
Dashboard /wp-admin3,121 ▲1907.15 ▲1.02153.74 ▼10.61103.08 ▼17.16
Posts /wp-admin/edit.php2,873 ▲1342.79 ▲0.0977.61 ▲4.76121.68 ▲27.43
Add New Post /wp-admin/post-new.php1,687 ▲9322.49 ▲3.68288.33 ▼106.89158.10 ▲43.17
Media Library /wp-admin/upload.php1,943 ▲1365.60 ▲0.58141.74 ▼21.87145.98 ▲17.30
Settings /wp-admin/admin.php?page=coreftCalendar-settings3,7848.14191.31113.47
Color Settings /wp-admin/admin.php?page=coreftCalendar-special1,9936.01132.20108.65
Calendars /wp-admin/admin.php?page=coreftCalendar-admin1,6985.1698.31120.13
Venues /wp-admin/edit.php?post_type=coreft-venues1,9605.71111.85138.95
Events /wp-admin/edit.php?post_type=coreft-events2,0645.61118.76138.31
Shortcodes /wp-admin/admin.php?page=coreftCalendar-custom-shortcodes3,0786.07137.81121.97
Organizers /wp-admin/edit.php?post_type=coreft-organizers1,9095.37125.00136.76
Categories /wp-admin/edit-tags.php?taxonomy=coreft_events_category1,9173.0767.5693.62

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
You still need to fix the following
  • Uninstall procedure validation failed for this plugin
    • > Notice in wp-content/plugins/easy-event-calendar/src/functions.php+1215
    Undefined index: settings-updated
  • The plugin did not uninstall successfully, leaving 5 tables in the database
    • wp_coreftcalendar_booking
    • wp_coreftcalendar_special_dates_calendar
    • wp_coreftcalendar_calendars
    • wp_coreftcalendar_subscribers_calendar
    • wp_coreftcalendar_special_dates
  • Zombie WordPress options were found after uninstall: 5 options
    • widget_eventscalendar
    • widget_eventscalendartodayevents
    • widget_eventscalendaraddevents
    • widget_eventscalendarupcomingevents
    • widget_eventscalendaraccordion

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
These server-side errors were triggered
  • 11 occurences, only the last one shown
    • > GET request to /wp-admin/edit-tags.php?taxonomy=coreft_events_category
    • > Notice in wp-content/plugins/easy-event-calendar/src/functions.php+1215
    Undefined index: settings-updated
    • > GET request to /wp-admin/admin.php?page=coreftCalendar-settings
    • > Notice in wp-content/plugins/easy-event-calendar/views/admin/settings.php+209
    Undefined index: days_reminders
    • > GET request to /wp-admin/admin.php?page=coreftCalendar-settings
    • > Notice in wp-content/plugins/easy-event-calendar/views/admin/settings.php+228
    Undefined index: terms_conditions
    • > GET request to /wp-admin/admin.php?page=coreftCalendar-settings
    • > Notice in wp-content/plugins/easy-event-calendar/views/admin/settings.php+248
    Undefined index: pagination
    • > GET request to /wp-admin/admin.php?page=coreftCalendar-settings
    • > Notice in wp-content/plugins/easy-event-calendar/views/admin/settings.php+262
    Undefined index: max_file_size
    • > GET request to /wp-admin/admin.php?page=coreftCalendar-settings
    • > Notice in wp-content/plugins/easy-event-calendar/views/admin/settings.php+318
    Undefined index: google_map_zoom
    • > GET request to /wp-admin/admin.php?page=coreftCalendar-settings
    • > Notice in wp-content/plugins/easy-event-calendar/views/admin/settings.php+484
    Undefined index: remove_expired_status
    • > GET request to /wp-admin/admin.php?page=coreftCalendar-settings
    • > Notice in wp-content/plugins/easy-event-calendar/views/admin/settings.php+501
    Undefined index: remove_expired_completly
    • > GET request to /wp-admin/admin.php?page=coreftCalendar-settings
    • > Notice in wp-content/plugins/easy-event-calendar/views/admin/settings.php+516
    Undefined index: remove_expired_days
    • > GET request to /wp-admin/admin.php?page=coreftCalendar-settings
    • > Notice in wp-content/plugins/easy-event-calendar/views/admin/settings.php+536
    Undefined index: event_single_enable
    • > GET request to /wp-admin/admin.php?page=coreftCalendar-settings
    • > Notice in wp-content/plugins/easy-event-calendar/views/admin/settings.php+584
    Undefined index: custom_fields_counter
    • > GET request to /wp-admin/admin.php?page=coreftCalendar-settings
    • > Notice in wp-content/plugins/easy-event-calendar/views/admin/settings.php+671
    Undefined index: booking_custom_fields_counter
    • > GET request to /wp-admin/admin.php?page=coreftCalendar-admin
    • > Notice in wp-content/plugins/easy-event-calendar/src/calendars.php+761
    Trying to get property 'counter' of non-object

SRP 50% 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
Please fix the following
  • 20× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'Facebook\\Helpers\\FacebookSignedRequestFromInputHelper' not found in wp-content/plugins/easy-event-calendar/src/Facebook/Helpers/FacebookJavaScriptLoginHelper.php:32
    • > PHP Fatal error
      Uncaught Error: Class 'Facebook\\Exceptions\\FacebookSDKException' not found in wp-content/plugins/easy-event-calendar/src/Facebook/Exceptions/FacebookRequestException.php:32
    • > PHP Fatal error
      Uncaught Error: Interface 'Facebook\\HttpClients\\FacebookHttpClientInterface' not found in wp-content/plugins/easy-event-calendar/src/Facebook/HttpClients/FacebookGuzzleHttpClient.php:32
    • > PHP Fatal error
      Uncaught Error: Class 'Facebook\\Exceptions\\FacebookRequestException' not found in wp-content/plugins/easy-event-calendar/src/Facebook/Exceptions/FacebookThrottleException.php:30
    • > PHP Fatal error
      Uncaught Error: Class 'Facebook\\Exceptions\\FacebookRequestException' not found in wp-content/plugins/easy-event-calendar/src/Facebook/Exceptions/FacebookServerException.php:30
    • > PHP Warning
      "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"? in wp-content/plugins/easy-event-calendar/src/ical_parser.php on line 262
    • > PHP Fatal error
      Uncaught Error: Class 'Facebook\\Exceptions\\FacebookRequestException' not found in wp-content/plugins/easy-event-calendar/src/Facebook/Exceptions/FacebookPermissionException.php:30
    • > PHP Fatal error
      Uncaught Error: Class 'Facebook\\Exceptions\\FacebookRequestException' not found in wp-content/plugins/easy-event-calendar/src/Facebook/Exceptions/FacebookOtherException.php:30
    • > PHP Fatal error
      Uncaught Error: Class 'Facebook\\GraphNodes\\GraphObject' not found in wp-content/plugins/easy-event-calendar/src/Facebook/GraphNodes/GraphAlbum.php:32
    • > PHP Fatal error
      Uncaught Error: Class 'Facebook\\Helpers\\FacebookCanvasLoginHelper' not found in wp-content/plugins/easy-event-calendar/src/Facebook/Helpers/FacebookPageTabHelper.php:31

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There are user-side issues you should fix
    • > GET request to /wp-admin/admin.php?page=coreftCalendar-special
    • > Console-api (warning) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,jquery-ui-core,moxiejs,plupload,jquery-ui-mouse,jquery-ui-resizable,jquery-ui-draggable,jquery-&load%5Bchunk_1%5D=ui-controlgroup,jquery-ui-checkboxradio,jquery-ui-button,jquery-ui-dialog&ver=5.8.1 1:31592 "jQuery.Deferred exception: jQuery(...).live is not a function" "TypeError: jQuery(...).live is not a function\n at HTMLDocument.\u003Canonymous> (/wp-content/plugins/easy-event-calendar/js/admin_settings.js?ver=5.8.1:141:35)\n at e (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,jquery-ui-core,moxiejs,plupload,jquery-ui-mouse,jquery-ui-resizable,jquery-ui-draggable,jquery-&load%5Bchunk_1%5D=ui-controlgroup,jquery-ui-checkboxradio,jquery-ui-button,jquery-ui-dialog&ver=5.8.1:2:30038)\n at t (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,jquery-ui-core,moxiejs,plupload,jquery-ui-mouse,jquery-ui-resizable,jquery-ui-draggable,jquery-&load%5Bchunk_1%5D=ui-controlgroup,jquery-ui-checkboxradio,jquery-ui-button,jquery-ui-dialog&ver=5.8.1:2:30340)" undefined
    • > GET request to /wp-admin/admin.php?page=coreftCalendar-special
    • > Javascript (severe) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,jquery-ui-core,moxiejs,plupload,jquery-ui-mouse,jquery-ui-resizable,jquery-ui-draggable,jquery-&load%5Bchunk_1%5D=ui-controlgroup,jquery-ui-checkboxradio,jquery-ui-button,jquery-ui-dialog&ver=5.8.1 1:31702 Uncaught TypeError: jQuery(...).live is not a function

Optimizations

Plugin configuration 90% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
3 plugin tags: event calendar, event, calendar

easy-event-calendar/coreftCalendar.php 77% from 13 tests

"Easy Event calendar" version 1.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
You should first fix the following items:
  • Description: The description should be shorter than 140 characters (currently 152 characters long)
  • Domain Path: The domain path folder was not found ("/langs")
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("easy-event-calendar.php" instead of "coreftCalendar.php")

Code Analysis 0% from 3 tests

File types 0% from 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
It is important to fix the following items
  • For security reasons, never distribute binary or executable files with your plugin
    • .crt - Security Certificate in Firefox, IE, Chrome, Safari
      • wp-content/plugins/easy-event-calendar/src/Facebook/fb_ca_chain_bundle.crt
      • wp-content/plugins/easy-event-calendar/src/Facebook/HttpClients/fb_ca_chain_bundle.crt
38,095 lines of code in 87 files:
LanguageFilesBlank linesComment linesLines of code
PHP544,9035,05721,538
CSS201,28622610,919
JavaScript111,2609714,982
SVG100655
JSON1001

PHP code 0% from 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
Please fix the following
  • Please reduce cyclomatic complexity of classes to less than 1000 (currently 1,724)
  • Cyclomatic complexity of methods has to be reduced to less than 100 (currently 375)
Cyclomatic complexity
Average complexity per logical line of code0.50
Average class complexity54.71
▷ Minimum class complexity1.00
▷ Maximum class complexity1,724.00
Average method complexity6.38
▷ Minimum method complexity1.00
▷ Maximum method complexity375.00
Code structure
Namespaces6
Interfaces1
Traits0
Classes44
▷ Abstract classes24.55%
▷ Concrete classes4295.45%
▷ Final classes00.00%
Methods416
▷ Static methods5312.74%
▷ Public methods35384.86%
▷ Protected methods5613.46%
▷ Private methods71.68%
Functions138
▷ Named functions138100.00%
▷ Anonymous functions00.00%
Constants30
▷ Global constants1240.00%
▷ Class constants1860.00%
▷ Public constants18100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
75 PNG files occupy 0.17MB with 0.07MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/colorpicker/custom_rgb_g.png1.04KB0.80KB▼ 23.67%
images/colorpicker/colorpicker_hsb_b.png0.95KB0.76KB▼ 19.48%
images/calendar_loader_dark2.png2.58KB1.94KB▼ 25.03%
images/icons_dark/search.png1.10KB0.27KB▼ 75.84%
images/icons/search2.png1.31KB0.62KB▼ 52.43%