title: Wordpress plugin delete and delete it's database tables
body: <p>I have made a plugin that uses a database with tables created like this:</p>
  
  <pre><code>register_activation_hook( __FILE__, 'plugin_install' );
  function plugin_install() {
  global $wpdb;
  $table1 = $wpdb-&gt;prefix . 'table1';
              $charset_collate = '';
              if ( ! empty( $wpdb-&gt;charset ) ) {
                    $charset_collate = "DEFAULT CHARACTER SET {$wpdb-&gt;charset}";
                  }
              if ( ! empty( $wpdb-&gt;collate ) ) {
                    $charset_collate .= " COLLATE {$wpdb-&gt;collate}";
                  }
  
                  $sql = "CREATE TABLE IF NOT EXISTS $table1 (
                      id mediumint(9) NOT NULL AUTO_INCREMENT,
                      some_data varchar(55) DEFAULT '' NOT NULL,
                      UNIQUE KEY id (id)
                  ) $charset_collate;";
  
              require_once( ABSPATH . 'wp-admin/includes/upgrade.php' );
              dbDelta( $sql );
              }
  </code></pre>
  
  <p>I don't know how to delete all these tables when the plugin is deleted via the admin panel. Can someone help, please?</p>