WP Clean Up - Version 1.2.0

Version Description

  • It allows you to optimize your WordPress database without phpMyAdmin
Download this release

Release Info

Developer acalbert
Plugin Icon wp plugin WP Clean Up
Version 1.2.0
Comparing to
See all releases

Code changes from version 1.1.1 to 1.2.0

lang/wp-clean-up-zh_CN.mo CHANGED
Binary file
lang/wp-clean-up-zh_CN.po CHANGED
@@ -2,8 +2,8 @@ msgid ""
2
  msgstr ""
3
  "Project-Id-Version: WP-Clean-Up Languages\n"
4
  "Report-Msgid-Bugs-To: \n"
5
- "POT-Creation-Date: 2012-12-07 10:24+0800\n"
6
- "PO-Revision-Date: 2012-12-07 10:25+0800\n"
7
  "Last-Translator: 夜光 <berttung(#)gmail.com>\n"
8
  "Language-Team: 玻璃泉BoLiQuan.COM <berttung(#)gmail.com>\n"
9
  "MIME-Version: 1.0\n"
@@ -20,80 +20,100 @@ msgstr ""
20
  msgid "Settings"
21
  msgstr "设置"
22
 
23
- #: F:\xampp\htdocs\wordpress\wp-content\plugins\wp-clean-up/wp_clean_up_admin.php:80
24
  msgid "All revisions deleted!"
25
  msgstr "所有修订版本已删除!"
26
 
27
- #: F:\xampp\htdocs\wordpress\wp-content\plugins\wp-clean-up/wp_clean_up_admin.php:85
28
  msgid "All drafts deleted!"
29
  msgstr "所有草稿已删除!"
30
 
31
- #: F:\xampp\htdocs\wordpress\wp-content\plugins\wp-clean-up/wp_clean_up_admin.php:90
32
  msgid "All autodrafts deleted!"
33
  msgstr "所有自动草稿已删除!"
34
 
35
- #: F:\xampp\htdocs\wordpress\wp-content\plugins\wp-clean-up/wp_clean_up_admin.php:95
36
  msgid "All moderated comments deleted!"
37
  msgstr "所有待审评论已删除!"
38
 
39
- #: F:\xampp\htdocs\wordpress\wp-content\plugins\wp-clean-up/wp_clean_up_admin.php:100
40
  msgid "All spam comments deleted!"
41
  msgstr "所有垃圾评论已删除!"
42
 
43
- #: F:\xampp\htdocs\wordpress\wp-content\plugins\wp-clean-up/wp_clean_up_admin.php:105
44
  msgid "All trash comments deleted!"
45
  msgstr "所有回收站评论已删除!"
46
 
47
- #: F:\xampp\htdocs\wordpress\wp-content\plugins\wp-clean-up/wp_clean_up_admin.php:115
48
  msgid "All redundant data deleted!"
49
  msgstr "所有冗余数据已删除!"
50
 
51
- #: F:\xampp\htdocs\wordpress\wp-content\plugins\wp-clean-up/wp_clean_up_admin.php:127
 
 
 
 
52
  msgid "Type"
53
  msgstr "类型"
54
 
55
- #: F:\xampp\htdocs\wordpress\wp-content\plugins\wp-clean-up/wp_clean_up_admin.php:128
56
  msgid "Count"
57
  msgstr "数量"
58
 
59
- #: F:\xampp\htdocs\wordpress\wp-content\plugins\wp-clean-up/wp_clean_up_admin.php:129
60
  msgid "Operate"
61
  msgstr "操作"
62
 
63
- #: F:\xampp\htdocs\wordpress\wp-content\plugins\wp-clean-up/wp_clean_up_admin.php:135
64
  msgid "Revision"
65
  msgstr "修订版本"
66
 
67
- #: F:\xampp\htdocs\wordpress\wp-content\plugins\wp-clean-up/wp_clean_up_admin.php:143
68
- #: F:\xampp\htdocs\wordpress\wp-content\plugins\wp-clean-up/wp_clean_up_admin.php:157
69
- #: F:\xampp\htdocs\wordpress\wp-content\plugins\wp-clean-up/wp_clean_up_admin.php:171
70
- #: F:\xampp\htdocs\wordpress\wp-content\plugins\wp-clean-up/wp_clean_up_admin.php:185
71
- #: F:\xampp\htdocs\wordpress\wp-content\plugins\wp-clean-up/wp_clean_up_admin.php:199
72
- #: F:\xampp\htdocs\wordpress\wp-content\plugins\wp-clean-up/wp_clean_up_admin.php:213
73
  msgid "Delete"
74
  msgstr "删除"
75
 
76
- #: F:\xampp\htdocs\wordpress\wp-content\plugins\wp-clean-up/wp_clean_up_admin.php:149
77
  msgid "Draft"
78
  msgstr "草稿"
79
 
80
- #: F:\xampp\htdocs\wordpress\wp-content\plugins\wp-clean-up/wp_clean_up_admin.php:163
81
  msgid "Auto Draft"
82
  msgstr "自动草稿"
83
 
84
- #: F:\xampp\htdocs\wordpress\wp-content\plugins\wp-clean-up/wp_clean_up_admin.php:177
85
  msgid "Moderated Comments"
86
  msgstr "待审评论"
87
 
88
- #: F:\xampp\htdocs\wordpress\wp-content\plugins\wp-clean-up/wp_clean_up_admin.php:191
89
  msgid "Spam Comments"
90
  msgstr "垃圾评论"
91
 
92
- #: F:\xampp\htdocs\wordpress\wp-content\plugins\wp-clean-up/wp_clean_up_admin.php:205
93
  msgid "Trash Comments"
94
  msgstr "回收站评论"
95
 
96
- #: F:\xampp\htdocs\wordpress\wp-content\plugins\wp-clean-up/wp_clean_up_admin.php:224
97
  msgid "Delete All"
98
  msgstr "删除所有"
99
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2
  msgstr ""
3
  "Project-Id-Version: WP-Clean-Up Languages\n"
4
  "Report-Msgid-Bugs-To: \n"
5
+ "POT-Creation-Date: 2012-12-07 15:29+0800\n"
6
+ "PO-Revision-Date: 2012-12-07 15:29+0800\n"
7
  "Last-Translator: 夜光 <berttung(#)gmail.com>\n"
8
  "Language-Team: 玻璃泉BoLiQuan.COM <berttung(#)gmail.com>\n"
9
  "MIME-Version: 1.0\n"
20
  msgid "Settings"
21
  msgstr "设置"
22
 
23
+ #: F:\xampp\htdocs\wordpress\wp-content\plugins\wp-clean-up/wp_clean_up_admin.php:78
24
  msgid "All revisions deleted!"
25
  msgstr "所有修订版本已删除!"
26
 
27
+ #: F:\xampp\htdocs\wordpress\wp-content\plugins\wp-clean-up/wp_clean_up_admin.php:83
28
  msgid "All drafts deleted!"
29
  msgstr "所有草稿已删除!"
30
 
31
+ #: F:\xampp\htdocs\wordpress\wp-content\plugins\wp-clean-up/wp_clean_up_admin.php:88
32
  msgid "All autodrafts deleted!"
33
  msgstr "所有自动草稿已删除!"
34
 
35
+ #: F:\xampp\htdocs\wordpress\wp-content\plugins\wp-clean-up/wp_clean_up_admin.php:93
36
  msgid "All moderated comments deleted!"
37
  msgstr "所有待审评论已删除!"
38
 
39
+ #: F:\xampp\htdocs\wordpress\wp-content\plugins\wp-clean-up/wp_clean_up_admin.php:98
40
  msgid "All spam comments deleted!"
41
  msgstr "所有垃圾评论已删除!"
42
 
43
+ #: F:\xampp\htdocs\wordpress\wp-content\plugins\wp-clean-up/wp_clean_up_admin.php:103
44
  msgid "All trash comments deleted!"
45
  msgstr "所有回收站评论已删除!"
46
 
47
+ #: F:\xampp\htdocs\wordpress\wp-content\plugins\wp-clean-up/wp_clean_up_admin.php:113
48
  msgid "All redundant data deleted!"
49
  msgstr "所有冗余数据已删除!"
50
 
51
+ #: F:\xampp\htdocs\wordpress\wp-content\plugins\wp-clean-up/wp_clean_up_admin.php:117
52
+ msgid "Database Optimized!"
53
+ msgstr "数据库已优化!"
54
+
55
+ #: F:\xampp\htdocs\wordpress\wp-content\plugins\wp-clean-up/wp_clean_up_admin.php:129
56
  msgid "Type"
57
  msgstr "类型"
58
 
59
+ #: F:\xampp\htdocs\wordpress\wp-content\plugins\wp-clean-up/wp_clean_up_admin.php:130
60
  msgid "Count"
61
  msgstr "数量"
62
 
63
+ #: F:\xampp\htdocs\wordpress\wp-content\plugins\wp-clean-up/wp_clean_up_admin.php:131
64
  msgid "Operate"
65
  msgstr "操作"
66
 
67
+ #: F:\xampp\htdocs\wordpress\wp-content\plugins\wp-clean-up/wp_clean_up_admin.php:137
68
  msgid "Revision"
69
  msgstr "修订版本"
70
 
71
+ #: F:\xampp\htdocs\wordpress\wp-content\plugins\wp-clean-up/wp_clean_up_admin.php:145
72
+ #: F:\xampp\htdocs\wordpress\wp-content\plugins\wp-clean-up/wp_clean_up_admin.php:159
73
+ #: F:\xampp\htdocs\wordpress\wp-content\plugins\wp-clean-up/wp_clean_up_admin.php:173
74
+ #: F:\xampp\htdocs\wordpress\wp-content\plugins\wp-clean-up/wp_clean_up_admin.php:187
75
+ #: F:\xampp\htdocs\wordpress\wp-content\plugins\wp-clean-up/wp_clean_up_admin.php:201
76
+ #: F:\xampp\htdocs\wordpress\wp-content\plugins\wp-clean-up/wp_clean_up_admin.php:215
77
  msgid "Delete"
78
  msgstr "删除"
79
 
80
+ #: F:\xampp\htdocs\wordpress\wp-content\plugins\wp-clean-up/wp_clean_up_admin.php:151
81
  msgid "Draft"
82
  msgstr "草稿"
83
 
84
+ #: F:\xampp\htdocs\wordpress\wp-content\plugins\wp-clean-up/wp_clean_up_admin.php:165
85
  msgid "Auto Draft"
86
  msgstr "自动草稿"
87
 
88
+ #: F:\xampp\htdocs\wordpress\wp-content\plugins\wp-clean-up/wp_clean_up_admin.php:179
89
  msgid "Moderated Comments"
90
  msgstr "待审评论"
91
 
92
+ #: F:\xampp\htdocs\wordpress\wp-content\plugins\wp-clean-up/wp_clean_up_admin.php:193
93
  msgid "Spam Comments"
94
  msgstr "垃圾评论"
95
 
96
+ #: F:\xampp\htdocs\wordpress\wp-content\plugins\wp-clean-up/wp_clean_up_admin.php:207
97
  msgid "Trash Comments"
98
  msgstr "回收站评论"
99
 
100
+ #: F:\xampp\htdocs\wordpress\wp-content\plugins\wp-clean-up/wp_clean_up_admin.php:225
101
  msgid "Delete All"
102
  msgstr "删除所有"
103
 
104
+ #: F:\xampp\htdocs\wordpress\wp-content\plugins\wp-clean-up/wp_clean_up_admin.php:233
105
+ msgid "Table"
106
+ msgstr "数据表"
107
+
108
+ #: F:\xampp\htdocs\wordpress\wp-content\plugins\wp-clean-up/wp_clean_up_admin.php:234
109
+ msgid "Size"
110
+ msgstr "大小"
111
+
112
+ #: F:\xampp\htdocs\wordpress\wp-content\plugins\wp-clean-up/wp_clean_up_admin.php:269
113
+ msgid "Total"
114
+ msgstr "总计"
115
+
116
+ #: F:\xampp\htdocs\wordpress\wp-content\plugins\wp-clean-up/wp_clean_up_admin.php:277
117
+ msgid "Optimize"
118
+ msgstr "优化数据库"
119
+
readme.txt CHANGED
@@ -1,11 +1,11 @@
1
  === WP Clean Up ===
2
  Contributors: boliquan
3
  Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=SKA6TPPWSATKG&item_name=BoLiQuan&no_shipping=0&no_note=1&tax=0&currency_code=USD&lc=CA&bn=PP%2dDonationsBF&charset=UTF%2d8
4
- Tags: wp clean up,clean,cleaner,cleanup,database,mysql,comments,posts,post revisions,optimize,optimize database,revision,draft,auto draft,moderated,spam,trash
5
  License: GPLv2
6
  Requires at least: 2.7
7
  Tested up to: 3.4.2
8
- Stable tag: 1.1.1
9
 
10
  WP Clean Up can help us to clean up the wordpress database by removing "revision" "draft" "auto draft" and so on.
11
 
@@ -13,6 +13,7 @@ WP Clean Up can help us to clean up the wordpress database by removing "revision
13
  == Description ==
14
 
15
  WP Clean Up can help us to clean up the wordpress database by removing "revision" "draft" "auto draft" "moderated comments" "spam comments" "trash comments".
 
16
  It adds a settings page to "Dashboard"->"Settings"->"WP Clean Up" where you can clean up the wordpress database.
17
  It allows you to remove the redundant data within few clicks.
18
  It is a effective tool to keep your database clean and surely save a lot of space of your MySQL Database.
@@ -48,6 +49,10 @@ Related Links:
48
 
49
  == Changelog ==
50
 
 
 
 
 
51
  = 1.1.1 =
52
 
53
  * Some optimization
1
  === WP Clean Up ===
2
  Contributors: boliquan
3
  Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=SKA6TPPWSATKG&item_name=BoLiQuan&no_shipping=0&no_note=1&tax=0&currency_code=USD&lc=CA&bn=PP%2dDonationsBF&charset=UTF%2d8
4
+ Tags: wp clean up,wp cleanup,clean,cleaner,cleanup,database,mysql,comments,posts,post revisions,delete revision,wp cleaner,optimize,optimize database,revision,draft,auto draft,moderated,spam,trash
5
  License: GPLv2
6
  Requires at least: 2.7
7
  Tested up to: 3.4.2
8
+ Stable tag: 1.2.0
9
 
10
  WP Clean Up can help us to clean up the wordpress database by removing "revision" "draft" "auto draft" and so on.
11
 
13
  == Description ==
14
 
15
  WP Clean Up can help us to clean up the wordpress database by removing "revision" "draft" "auto draft" "moderated comments" "spam comments" "trash comments".
16
+ It allows you to optimize your WordPress database without phpMyAdmin.
17
  It adds a settings page to "Dashboard"->"Settings"->"WP Clean Up" where you can clean up the wordpress database.
18
  It allows you to remove the redundant data within few clicks.
19
  It is a effective tool to keep your database clean and surely save a lot of space of your MySQL Database.
49
 
50
  == Changelog ==
51
 
52
+ = 1.2.0 =
53
+
54
+ * It allows you to optimize your WordPress database without phpMyAdmin
55
+
56
  = 1.1.1 =
57
 
58
  * Some optimization
screenshot-1.png CHANGED
Binary file
wp-clean-up.php CHANGED
@@ -2,8 +2,8 @@
2
  /*
3
  Plugin Name: WP Clean Up
4
  Plugin URI: http://boliquan.com/wp-clean-up/
5
- Description: WP Clean Up can help us to clean up the wordpress database by removing "revision" "draft" "auto draft" "moderated comments" "spam comments" "trash comments".
6
- Version: 1.1.1
7
  Author: BoLiQuan
8
  Author URI: http://boliquan.com/
9
  Text Domain: WP-Clean-Up
2
  /*
3
  Plugin Name: WP Clean Up
4
  Plugin URI: http://boliquan.com/wp-clean-up/
5
+ Description: WP Clean Up can help us to clean up the wordpress database by removing "revision" "draft" "auto draft" "moderated comments" "spam comments" "trash comments". It allows you to optimize your WordPress database without phpMyAdmin.
6
+ Version: 1.2.0
7
  Author: BoLiQuan
8
  Author URI: http://boliquan.com/
9
  Text Domain: WP-Clean-Up
wp_clean_up_admin.php CHANGED
@@ -10,7 +10,6 @@ function wp_clean_up_page(){
10
  <h2>WP Clean Up</h2>
11
 
12
  <?php
13
-
14
  function wp_clean_up($type){
15
  global $wpdb;
16
  switch($type){
@@ -72,7 +71,6 @@ function wp_clean_up_count($type){
72
  return $count;
73
  }
74
 
75
-
76
  $wcu_message = '';
77
 
78
  if(isset($_POST['wp_clean_up_revision'])){
@@ -115,6 +113,10 @@ function wp_clean_up_count($type){
115
  $wcu_message = __("All redundant data deleted!","WP-Clean-Up");
116
  }
117
 
 
 
 
 
118
  if($wcu_message != ''){
119
  echo '<div id="message" class="updated fade"><p><strong>' . $wcu_message . '</strong></p></div>';
120
  }
@@ -217,7 +219,6 @@ function wp_clean_up_count($type){
217
  </tbody>
218
  </table>
219
  </p>
220
-
221
  <p>
222
  <form action="" method="post">
223
  <input type="hidden" name="wp_clean_up_all" value="all" />
@@ -226,6 +227,57 @@ function wp_clean_up_count($type){
226
  </p>
227
  <br />
228
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
229
 
230
  <h3>Related Links</h3>
231
  1. <a href="http://boliquan.com/wp-clean-up/" target="_blank">WP Clean Up (FAQ)</a> | <a href="http://wordpress.org/extend/plugins/wp-clean-up/" target="_blank">Download</a><br />
10
  <h2>WP Clean Up</h2>
11
 
12
  <?php
 
13
  function wp_clean_up($type){
14
  global $wpdb;
15
  switch($type){
71
  return $count;
72
  }
73
 
 
74
  $wcu_message = '';
75
 
76
  if(isset($_POST['wp_clean_up_revision'])){
113
  $wcu_message = __("All redundant data deleted!","WP-Clean-Up");
114
  }
115
 
116
+ if(isset($_POST['wp_clean_up_optimize'])){
117
+ $wcu_message = __("Database Optimized!","WP-Clean-Up");
118
+ }
119
+
120
  if($wcu_message != ''){
121
  echo '<div id="message" class="updated fade"><p><strong>' . $wcu_message . '</strong></p></div>';
122
  }
219
  </tbody>
220
  </table>
221
  </p>
 
222
  <p>
223
  <form action="" method="post">
224
  <input type="hidden" name="wp_clean_up_all" value="all" />
227
  </p>
228
  <br />
229
 
230
+ <table class="widefat" style="width:419px;">
231
+ <thead>
232
+ <tr>
233
+ <th scope="col"><?php _e('Table','WP-Clean-Up'); ?></th>
234
+ <th scope="col"><?php _e('Size','WP-Clean-Up'); ?></th>
235
+ </tr>
236
+ </thead>
237
+ <tbody id="the-list">
238
+ <?php
239
+ $total_size = 0;
240
+ $alternate = " class='alternate'";
241
+ $wcu_sql = 'SHOW TABLE STATUS FROM '.DB_NAME;
242
+ $result = mysql_query($wcu_sql);
243
+ if(mysql_num_rows($result)){
244
+ while($row = mysql_fetch_assoc($result)){
245
+ $table_size = $row['Data_length'] + $row['Index_length'];
246
+ $table_size = $table_size / 1024;
247
+ $table_size = round($table_size,3);
248
+
249
+ $every_size = $row['Data_length'] + $row['Index_length'];
250
+ $every_size = $every_size / 1024 ;
251
+ $total_size += $every_size;
252
+
253
+ if(isset($_POST['wp_clean_up_optimize'])){
254
+ $wcu_sql = 'OPTIMIZE TABLE '.$row['Name'];
255
+ mysql_query($wcu_sql);
256
+ }
257
+
258
+ echo "<tr". $alternate .">
259
+ <td class='column-name'>". $row['Name'] ."</td>
260
+ <td class='column-name'>". $table_size ." KB"."</td>
261
+ </tr>\n";
262
+ $alternate = (empty($alternate)) ? " class='alternate'" : "";
263
+ }
264
+ }
265
+ ?>
266
+ </tbody>
267
+ <tfoot>
268
+ <tr>
269
+ <th scope="col"><?php _e('Total','WP-Clean-Up'); ?></th>
270
+ <th scope="col" style="font-family:Tahoma;"><?php echo round($total_size,3).' KB'; ?></th>
271
+ </tr>
272
+ </tfoot>
273
+ </table>
274
+ <p>
275
+ <form action="" method="post">
276
+ <input type="hidden" name="wp_clean_up_optimize" value="optimize" />
277
+ <input type="submit" class="button-primary" value="<?php _e('Optimize','WP-Clean-Up'); ?>" />
278
+ </form>
279
+ </p>
280
+ <br />
281
 
282
  <h3>Related Links</h3>
283
  1. <a href="http://boliquan.com/wp-clean-up/" target="_blank">WP Clean Up (FAQ)</a> | <a href="http://wordpress.org/extend/plugins/wp-clean-up/" target="_blank">Download</a><br />