public static function on_uninstall()
 {
     if (!current_user_can('activate_plugins')) {
         return;
     }
     check_admin_referer('bulk-plugins');
     if (__FILE__ != WP_UNINSTALL_PLUGIN) {
         return;
     }
     ES_List_User_Searches_Database::clear_table();
 }
 public static function get_searched_query_data($filter_name = null, $successful = true)
 {
     if ($successful) {
         $where_condition = 'hits > 0';
     } else {
         $where_condition = 'hits = 0';
     }
     if (!is_null($filter_name)) {
         $where_condition .= ' AND ';
         $where_condition .= self::get_between_date_condition_by_filter_name($filter_name);
     }
     return ES_List_User_Searches_Database::get_data($where_condition);
 }
<?php

if (!empty($_POST) && check_admin_referer('es-reset-logs', '_esnonce')) {
    if (isset($_POST['es_reset_input']) && strtolower($_POST['es_reset_input']) === 'reset') {
        ES_List_User_Searches_Database::clear_table();
    }
}
?>

<div class="wrap">
  <h2>ES User Searches</h2>

  <h3>Total Searches</h3>  
  <div style="width: 30%; float: left; margin-right: 2%;">
    <table class="widefat">
      <thead>
        <tr><th colspan="2">Totals</th></tr>
      </thead>
      <tbody>
        <tr>
          <th>When</th><th>Searches</th>
        </tr>
        <tr>
          <td style="padding: 3px 5px">Today and yesterday</td>
          <td style="padding: 3px 5px;"><?php 
echo ES_List_User_Searches_Overview::get_count_search_queries('last_day');
?>
</td>
        </tr>
        <tr>
          <td style="padding: 3px 5px">Last 7 days</td>
 public static function save_search($search_query, $total_hits, $search_url = '')
 {
     ES_List_User_Searches_Database::save_search($search_query, $total_hits, $search_url);
 }