get_db_info()->get_version(); $tablesstatus = $wp_optimize->get_optimizer()->get_tables(); $is_multisite_mode = $wp_optimize->is_multisite_mode(); $total_gain = 0; $no = 0; $row_usage = 0; $data_usage = 0; $index_usage = 0; $overhead_usage = 0; $non_inno_db_tables = 0; $inno_db_tables = 0; $small_overhead_size = 1048576; foreach ($tablesstatus as $tablestatus) { $no++; echo ''."\n"; echo ''.number_format_i18n($no).''."\n"; echo ''.htmlspecialchars($tablestatus->Name); if (!empty($tablestatus->plugin_status)) { if ($tablestatus->wp_core_table) { echo "
".__('Belongs to:', 'wp-optimize')." "; echo "".__('WordPress core', 'wp-optimize').""; } else { echo '
'; echo "".__('Known plugins that use this table name:', 'wp-optimize')." "; $separator = '
'; foreach ($tablestatus->plugin_status as $plugins_status) { $plugin = $plugins_status['plugin']; $status = $plugins_status['status']; echo $separator; echo " {$plugin}"; if (false == $status['installed']) { echo " [".__('not installed', 'wp-optimize')."]"; } elseif (false == $status['active']) { echo " [".__('inactive', 'wp-optimize')."]"; } } echo '
'; } } echo "\n"; echo ''.number_format_i18n($tablestatus->Rows).''."\n"; echo ''.$wp_optimize->format_size($tablestatus->Data_length).''."\n"; echo ''.$wp_optimize->format_size($tablestatus->Index_length).''."\n"; if ($tablestatus->is_optimizable) { echo ''.htmlspecialchars($tablestatus->Engine).''."\n"; echo ''; $font_colour = ($optimize_db ? (($tablestatus->Data_free > $small_overhead_size) ? '#0000FF' : '#004600') : (($tablestatus->Data_free > $small_overhead_size) ? '#9B0000' : '#004600')); echo ''; echo $wp_optimize->format_size($tablestatus->Data_free); echo ''; echo ''."\n"; $overhead_usage += $tablestatus->Data_free; $total_gain += $tablestatus->Data_free; $non_inno_db_tables++; } else { echo ''.htmlspecialchars($tablestatus->Engine).''."\n"; echo ''; echo '-'; echo ''."\n"; $inno_db_tables++; } echo ''.apply_filters('wpo_tables_list_additional_column_data', '', $tablestatus).''; $row_usage += $tablestatus->Rows; $data_usage += $tablestatus->Data_length; $index_usage += $tablestatus->Index_length; echo ''."\n"; } // THis extra tbody with class of tablesorter-no-sort // Is for tablesorter and it will not allow the total bar // At the bottom of the table information to be sorted with the rest of the data echo ''."\n"; echo ''."\n"; echo ''.__('Total:', 'wp-optimize').''."\n"; echo ''.sprintf(_n('%s Table', '%s Tables', $no, 'wp-optimize'), number_format_i18n($no)).''."\n"; echo ''.number_format_i18n($row_usage).''."\n"; echo ''.$wp_optimize->format_size($data_usage).''."\n"; echo ''.$wp_optimize->format_size($index_usage).''."\n"; echo ''.'-'.''."\n"; echo ''; $font_colour = (($optimize_db) ? (($overhead_usage > $small_overhead_size) ? '#0000FF' : '#004600') : (($overhead_usage > $small_overhead_size) ? '#9B0000' : '#004600')); echo ''.$wp_optimize->format_size($overhead_usage).''; ?>