Comment out memory check
Update queries to use prepared statements, address deprecated wpdb
methods, and create consistent structuring
Use wpdb->insert instead of wpdb->query
Update error message references case

BUGFIX: misspelling of false as flase in Event control