10% simple-wp-events

Code Review | Simple WP Events

WordPress plugin Simple WP Events scored10%from 54 tests.

About plugin

  • Plugin page: simple-wp-events
  • Plugin version: 1.8.0
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.2
  • WordPress version: 6.3.1
  • First release: Sep 6, 2022
  • Latest release: Jun 14, 2023
  • Number of updates: 20
  • Update frequency: every 14.1 days
  • Top authors: wpminds (100%)

Code review

54 tests

User reviews

1 review

Install metrics

90+ active /418 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
You still need to fix the following installer errors
  • The plugin did not install without errors
    • > Notice in wp-content/plugins/simple-wp-events/includes/class-wp-events-activator.php+52
    Trying to access array offset on value of type bool

Server metrics [RAM: ▲1.68MB] [CPU: ▲10.11ms] Passed 4 tests

This is a short check of server-side resources used by Simple WP Events
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /5.09 ▲1.6350.99 ▲5.62
Dashboard /wp-admin5.03 ▲1.7364.76 ▲17.70
Posts /wp-admin/edit.php5.09 ▲1.7463.71 ▲19.01
Add New Post /wp-admin/post-new.php7.71 ▲1.8395.30 ▲4.20
Media Library /wp-admin/upload.php4.86 ▲1.6444.49 ▲12.90
Add New /wp-admin/post-new.php?post_type=wp_events7.2897.20
View/Edit Entry /wp-admin/admin.php?page=wpe_view_entry4.8544.10
Settings /wp-admin/edit.php?post_type=wp_events&page=wp_events_settings4.8848.19
Entries /wp-admin/edit.php?post_type=wp_events&page=wp_forms_entries4.8440.61
Events /wp-admin/edit.php?post_type=wp_events5.0256.02
Categories /wp-admin/edit-tags.php?taxonomy=wpevents-category&post_type=wp_events4.8944.78
Locations /wp-admin/edit.php?post_type=locations5.0150.42

Server storage [IO: ▲1.40MB] [DB: ▲0.01MB] Passed 3 tests

How much does this plugin use your filesystem and database?
This plugin was installed successfully
Filesystem: 84 new files
Database: 2 new tables, 12 new options
New tables
wp_events_registration
wp_events_subscribers
New WordPress options
widget_recent-comments
wpe_firm_settings
wpe_reCAPTCHA_settings
widget_recent-posts
can_compress_scripts
wpe_display_settings
db_upgraded
theysaidso_admin_options
wpe_mail_settings
wpe_forms_settings
...

Browser metrics Passed 4 tests

This is an overview of browser requirements for Simple WP Events
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,142 ▲40716.85 ▲2.6419.24 ▲16.9040.63 ▼5.63
Dashboard /wp-admin2,413 ▲2257.01 ▲2.10141.36 ▲23.0446.97 ▲5.17
Posts /wp-admin/edit.php2,328 ▲2363.47 ▲1.4750.93 ▲14.7430.59 ▼3.15
Add New Post /wp-admin/post-new.php1,582 ▲4823.25 ▲0.03663.08 ▼6.2135.18 ▼17.00
Media Library /wp-admin/upload.php1,454 ▲634.79 ▲0.5795.50 ▼6.2942.80 ▲1.06
Add New /wp-admin/post-new.php?post_type=wp_events8,37926.20943.70107.26
View/Edit Entry /wp-admin/admin.php?page=wpe_view_entry1,0693.6043.7254.20
Settings /wp-admin/edit.php?post_type=wp_events&page=wp_events_settings3,3453.4951.8972.61
Entries /wp-admin/edit.php?post_type=wp_events&page=wp_forms_entries1,3153.5942.0562.54
Events /wp-admin/edit.php?post_type=wp_events1,4583.4749.4429.09
Categories /wp-admin/edit-tags.php?taxonomy=wpevents-category&post_type=wp_events1,5043.6845.4227.54
Locations /wp-admin/edit.php?post_type=locations1,2893.8447.7928.23

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
These items require your attention
  • The uninstall procedure failed, leaving 2 tables in the database
    • wp_events_registration
    • wp_events_subscribers
  • Zombie WordPress options were found after uninstall: 12 options
    • wpe_firm_settings
    • wpe_mail_settings
    • theysaidso_admin_options
    • widget_recent-comments
    • wpe_reCAPTCHA_settings
    • wpe_display_settings
    • wpe_forms_settings
    • db_upgraded
    • wpe_settings
    • widget_recent-posts
    • ...

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Smoke test failed, please fix the following
  • 4 occurences, only the last one shown
    • > GET request to /wp-admin/edit.php?post_type=wp_events&page=wp_forms_entries
    • > User notice in wp-includes/functions.php+5905
    Function wpdb::prepare was called incorrectly. The query argument of wpdb::prepare() must have a placeholder. Please see Debugging in WordPress for more information. (This message was added in version 3.9.0.)
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=wpe_view_entry
    • > Notice in wp-content/plugins/simple-wp-events/admin/includes/wp-events-view-edit-entry.php+336
    Undefined variable: data
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=wpe_view_entry
    • > Warning in wp-content/plugins/simple-wp-events/admin/includes/wp-events-view-edit-entry.php+339
    Invalid argument supplied for foreach()
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=wpe_view_entry
    • > Warning in wp-content/plugins/simple-wp-events/admin/includes/wp-events-view-edit-entry.php+350
    array_values() expects parameter 1 to be array, null given
    • > GET request to /wp-admin/admin.php?page=wpe_view_entry
    • > Warning in wp-content/plugins/simple-wp-events/admin/includes/wp-events-view-edit-entry.php+346
    sizeof(): Parameter must be an array or an object that implements Countable
    • > GET request to /wp-admin/edit.php?post_type=wp_events&page=wp_forms_entries
    • > User notice in wp-includes/functions.php+5905
    Function wpdb::prepare was called incorrectly. The query does not contain the correct number of placeholders (0) for the number of arguments passed (1). Please see Debugging in WordPress for more information. (This message was added in version 4.8.3.)

SRP 50% 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
Almost there! Just fix the following items
  • 10× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wpe_redirect_to_external_url() in wp-content/plugins/simple-wp-events/public/templates/single-wp_events.php:12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugins_url() in wp-content/plugins/simple-wp-events/admin/templates/wp-events-form-entries-display.php:16
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugins_url() in wp-content/plugins/simple-wp-events/admin/templates/wp-events-view-entry-display.php:17
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/simple-wp-events/admin/includes/wp-events-list-entries.php:83
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_header() in wp-content/plugins/simple-wp-events/public/templates/taxonomy-wpevents-category.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/simple-wp-events/public/templates/genesis/archive-wp_events.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function settings_errors() in wp-content/plugins/simple-wp-events/admin/templates/wp-events-admin-settings-display.php:18
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_header() in wp-content/plugins/simple-wp-events/public/templates/archive-wp_events.php:7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/simple-wp-events/admin/includes/wp-events-view-edit-entry.php:235
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/simple-wp-events/admin/includes/wp-events-export-events.php:149

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Please fix the following browser errors
    • > GET request to /wp-admin/post-new.php?post_type=wp_events
    • > Rendering (warning) in unknown
    /wp-admin/post-new.php?post_type=wp_events 353 The specified value "N/A" cannot be parsed, or is out of range.

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
6 plugin tags: registrations, seminars, webinars, calendar, reminders...

simple-wp-events/wp-events.php 92% from 13 tests

"Simple WP Events" version 1.8.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:
  • Main file name: Name the main plugin file the same as the plugin slug ("simple-wp-events.php" instead of "wp-events.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Everything looks great! No dangerous files found in this plugin10,785 lines of code in 46 files:
LanguageFilesBlank linesComment linesLines of code
PHP341,2293,2867,817
CSS5289431,494
JavaScript61662831,377
Markdown123097

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.39
Average class complexity42.93
▷ Minimum class complexity1.00
▷ Maximum class complexity122.00
Average method complexity3.42
▷ Minimum method complexity1.00
▷ Maximum method complexity29.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes15
▷ Abstract classes00.00%
▷ Concrete classes15100.00%
▷ Final classes00.00%
Methods260
▷ Static methods124.62%
▷ Public methods22686.92%
▷ Protected methods103.85%
▷ Private methods249.23%
Functions105
▷ Named functions10297.14%
▷ Anonymous functions32.86%
Constants8
▷ Global constants8100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
32 PNG files occupy 0.64MB with 0.31MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/screenshot-3.png51.33KB27.98KB▼ 45.50%
assets/banner-1544x500.png62.02KB24.55KB▼ 60.43%
assets/screenshot-8.png32.68KB20.40KB▼ 37.59%
assets/screenshot-2.png59.01KB27.05KB▼ 54.16%
admin/css/images/ui-bg_glass_75_dadada_1x400.png0.29KB0.16KB▼ 46.84%