FAQ21 Drop database tables after uninstall

The plugin chooses not to drop any custom database tables on uninstall. This helps to avoid accidental loss of data. If you wish to cleanup and drop any custom database tables created by the plugin, you can do so manually using a database management system such as phpMyAdmin or by executing the following PHP code as a part of the uninstall hook.

<?php
global $wpdb;
$wpdb->query( 'DROP TABLE IF EXISTS ' . $wpdb->prefix . MRP_Multi_Rating::RATING_ITEM_ENTRY_TBL_NAME );
$wpdb->query( 'DROP TABLE IF EXISTS ' . $wpdb->prefix . MRP_Multi_Rating::RATING_ITEM_ENTRY_VALUE_TBL_NAME );
$wpdb->query( 'DROP TABLE IF EXISTS ' . $wpdb->prefix . MRP_Multi_Rating::RATING_ITEM_TBL_NAME );
$wpdb->query( 'DROP TABLE IF EXISTS ' . $wpdb->prefix . MRP_Multi_Rating::RATING_FORM_TBL_NAME );
$wpdb->query( 'DROP TABLE IF EXISTS ' . $wpdb->prefix . MRP_Multi_Rating::RATING_RESULT_TBL_NAME );
// custom fields
$custom_fields = MRP_Multi_Rating_API::get_custom_fields( null );
foreach ( $custom_fields as $custom_field ) {
$wpdb->query( 'DROP TABLE IF EXISTS ' . $wpdb->prefix . 'mrp_custom_field_' . $custom_field['custom_field_id'] );
}
$wpdb->query( 'DROP TABLE IF EXISTS ' . $wpdb->prefix . MRP_Multi_Rating::CUSTOM_FIELDS_TBL_NAME );