Why is this plugin not working?

$wpdb->custom should be "{$wpdb->prefix}custom"

$wpdb->insert( $table, $data, $format );
take three params where 1st is table name. you should avoid wp as its not necessary that prefix will always be wp_ instead use $wpdb->prefix to get table prefix,
"{$wpdb->prefix}custom"
will output wp_custom (given prefix is wp for your site)