66% eventupon-calendar

Code Review | Event Calendar AutoPOP

WordPress plugin Event Calendar AutoPOP scored 66% from 54 tests.

About plugin

  • Plugin page: eventupon-calendar
  • Plugin version: 1.5
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.6
  • WordPress version: 6.3.1
  • First release: Dec 18, 2015
  • Latest release: Dec 23, 2016
  • Number of updates: 36
  • Update frequency: every 10.4 days
  • Top authors: maksim270 (66.67%)gorbachiov (36.11%)

Code review

54 tests

User reviews

4 reviews

Install metrics

10+ active / 3,861 total downloads

Benchmarks

Plugin footprint 82% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Install script ran successfully

Server metrics [RAM: ▲0.21MB] [CPU: ▲0.44ms] 75% from 4 tests

Server-side resources used by Event Calendar AutoPOP
Please have a look at the following items
  • CPU: The total CPU usage must kept under 500.00ms (currently 581.19ms on /wp-admin/admin.php?page=autopop_draft_events)
PageMemory (MB)CPU Time (ms)
Home /3.64 ▲0.1839.42 ▲0.57
Dashboard /wp-admin3.51 ▲0.2148.93 ▲1.21
Posts /wp-admin/edit.php3.63 ▲0.2747.37 ▲1.17
Add New Post /wp-admin/post-new.php6.11 ▲0.2390.03 ▼1.17
Media Library /wp-admin/upload.php3.44 ▲0.2139.79 ▲8.08
AutoPOP /wp-admin/admin.php?page=autopop_menu3.4031.53
Add Event /wp-admin/admin.php?page=autopop_add_update_event3.4739.08
Draft Events /wp-admin/admin.php?page=autopop_draft_events3.42581.19
Settings /wp-admin/admin.php?page=autopop_settings3.4032.66
Live Events /wp-admin/admin.php?page=autopop_live_events3.42497.57
Past Events /wp-admin/admin.php?page=autopop_past_events3.42494.37
EventUpon Calendar /wp-admin/options-general.php?page=eventupon_calendar3.4031.24

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

Input-output and database impact of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 47 new files
Database: no new tables, 19 new options
New WordPress options
widget_theysaidso_widget
theysaidso_admin_options
eventupon_calendar_header_text_color
eventupon_calendar_background_color
eventupon_calendar_agenda_date_bg
eventupon_calendar_header_background_color
widget_recent-posts
eventupon_calendar_grid_color
db_upgraded
eventupon_calendar_view_mode
...

Browser metrics Passed 4 tests

Checking browser requirements for Event Calendar AutoPOP
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,882 ▲14713.78 ▼0.601.82 ▲0.2639.78 ▼2.83
Dashboard /wp-admin2,290 ▲1025.36 ▲0.50120.05 ▲8.3041.21 ▼2.29
Posts /wp-admin/edit.php2,178 ▲893.14 ▲1.1051.61 ▲16.7131.62 ▼3.86
Add New Post /wp-admin/post-new.php1,580 ▲6023.51 ▲0.26620.16 ▼48.1436.05 ▼11.72
Media Library /wp-admin/upload.php1,479 ▲915.81 ▲1.60115.48 ▲16.9145.30 ▲3.26
AutoPOP /wp-admin/admin.php?page=autopop_menu9052.9337.3226.01
Add Event /wp-admin/admin.php?page=autopop_add_update_event2,5768.16152.3750.19
Draft Events /wp-admin/admin.php?page=autopop_draft_events9122.9436.6425.00
Settings /wp-admin/admin.php?page=autopop_settings7371.576.9121.40
Live Events /wp-admin/admin.php?page=autopop_live_events9162.9441.7132.64
Past Events /wp-admin/admin.php?page=autopop_past_events9093.1037.2925.38
EventUpon Calendar /wp-admin/options-general.php?page=eventupon_calendar7371.577.3517.28

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
It is recommended to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-posts
    • db_upgraded
    • can_compress_scripts
    • widget_recent-comments
    • widget_theysaidso_widget
    • theysaidso_admin_options

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
Please fix the following server-side errors
    • > GET request to /wp-admin/admin.php?page=autopop_settings
    • > Error in wp-admin/includes/template.php+1801
    Uncaught ArgumentCountError: Too few arguments to function do_settings_fields(), 1 passed in wp-content/plugins/eventupon-calendar/templates/settings.tpl.php on line 5 and exactly 2 expected in wp-admin/includes/template.php:1801
    Stack trace:
    #0 wp-content/plugins/eventupon-calendar/templates/settings.tpl.php(5): do_settings_fields()
    #1 wp-content/plugins/eventupon-calendar/settings.php(410): include('/var/www/wordpr...')
    #2 wp-includes/class-wp-hook.php(310): EventUpon_Calendar_Settings->plugin_settings_page()
    #3 wp-includes/class-wp-hook.php(334): WP_Hook->apply_filters()
    #4 wp-includes/plugin.php(517): WP_Hook->do_action()
    #5 wp-admin/admin.php(259): do_action()
    #6 {main}
    thrown
    • > GET request to /wp-admin/options-general.php?page=eventupon_calendar
    • > Error in wp-admin/includes/template.php+1801
    Uncaught ArgumentCountError: Too few arguments to function do_settings_fields(), 1 passed in wp-content/plugins/eventupon-calendar/templates/settings.tpl.php on line 5 and exactly 2 expected in wp-admin/includes/template.php:1801
    Stack trace:
    #0 wp-content/plugins/eventupon-calendar/templates/settings.tpl.php(5): do_settings_fields()
    #1 wp-content/plugins/eventupon-calendar/settings.php(410): include('/var/www/wordpr...')
    #2 wp-includes/class-wp-hook.php(310): EventUpon_Calendar_Settings->plugin_settings_page()
    #3 wp-includes/class-wp-hook.php(334): WP_Hook->apply_filters()
    #4 wp-includes/plugin.php(517): WP_Hook->do_action()
    #5 wp-admin/admin.php(259): do_action()
    #6 wp-admin/options-general.php(10): require_once('/var/www/wordpr...')
    #7 {main}
    thrown

SRP 0% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please fix the following items
  • 1× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/eventupon-calendar/templates/_delete_event.tpl.php
  • 15× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_editor() in wp-content/plugins/eventupon-calendar/templates/add_update_event.tpl.php:62
    • > PHP Notice
      Undefined variable: eventType in wp-content/plugins/eventupon-calendar/templates/event_list_header.tpl.php on line 1
    • > PHP Notice
      Undefined variable: event_update_id in wp-content/plugins/eventupon-calendar/templates/add_update_event.tpl.php on line 31
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/eventupon-calendar/settings.php:416
    • > PHP Fatal error
      Uncaught Error: Call to undefined function settings_fields() in wp-content/plugins/eventupon-calendar/templates/settings.tpl.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function admin_url() in wp-content/plugins/eventupon-calendar/templates/dashboard.tpl.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/eventupon-calendar/eventupon-calendar.php:548
    • > PHP Fatal error
      Uncaught Error: Class 'EventUpon_Calendar' not found in wp-content/plugins/eventupon-calendar/templates/event_list_header.tpl.php:1
    • > PHP Notice
      Undefined variable: page in wp-content/plugins/eventupon-calendar/templates/_delete_event.tpl.php on line 17
    • > PHP Notice
      Undefined variable: event_id2delete in wp-content/plugins/eventupon-calendar/templates/_delete_event.tpl.php on line 24

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
    • > GET request to /wp-admin/admin.php?page=autopop_add_update_event
    • > Javascript (severe) in unknown
    /wp-content/plugins/eventupon-calendar/_inc/form-validator/security.js 8:7872 Uncaught TypeError: Cannot read properties of undefined (reading 'validationConfig')

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 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
Attributes that need to be fixed:
  • Tags: Please reduce the number of tags, currently 23 tag instead of maximum 10
The official readme.txt might help

eventupon-calendar/eventupon-calendar.php Passed 13 tests

The main PHP script in "Event Calendar AutoPOP" version 1.5 is automatically included on every request by WordPress
113 characters long description:
Displays events from EventUpon.com, activate and place [eu-calendar] tag to a page you want to have the calendar.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Good job! No executable or dangerous file extensions detected2,950 lines of code in 39 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript262815791,568
PHP8134941,162
CSS53627220

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.50
Average class complexity42.50
▷ Minimum class complexity18.00
▷ Maximum class complexity67.00
Average method complexity3.86
▷ Minimum method complexity1.00
▷ Maximum method complexity27.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods29
▷ Static methods310.34%
▷ Public methods2379.31%
▷ Protected methods00.00%
▷ Private methods620.69%
Functions5
▷ Named functions5100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants00.00%
▷ Class constants3100.00%
▷ Public constants3100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
6 PNG files occupy 0.03MB with 0.01MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
_inc/jquery-ui/images/ui-icons_cc0000_256x240.png4.44KB4.17KB▼ 6.02%
_inc/jquery-ui/images/ui-icons_777777_256x240.png6.83KB4.17KB▼ 38.92%
_inc/jquery-ui/images/ui-icons_777620_256x240.png4.44KB4.17KB▼ 6.02%
_inc/jquery-ui/images/ui-icons_555555_256x240.png6.82KB4.17KB▼ 38.82%
_inc/jquery-ui/images/ui-icons_ffffff_256x240.png6.15KB4.17KB▼ 32.13%