Advanced Database Cleaner - Version 1.3.6

Version Description

  • Fixing a problem in donate button
  • Using e() and _() for all texts in the plugin
Download this release

Release Info

Developer symptote
Plugin Icon 128x128 Advanced Database Cleaner
Version 1.3.6
Comparing to
See all releases

Code changes from version 1.3.5 to 1.3.6

README.txt CHANGED
@@ -1,10 +1,10 @@
1
=== Advanced Database Cleaner ===
2
Contributors: symptote
3
- Donate Link: https://www.paypal.com/us/cgi-bin/webscr?cmd=_flow&SESSION=Azq_P8u-Dy9AZSB3bmJFsrGWImHWiCoHtSE8KuC2SNdGQpreQxG8dl2tVZK&dispatch=5885d80a13c0db1f8e263663d3faee8d0b9dcb01a9b6dc564e45f62871326a5e
4
Tags: plugin, plugins, plugin wordpress, wordpress, database cleaner, clean database, database clean, database, clean, clean-up, clean up, cleanup, cleaner, delete orphan data, orphan data, delete revisions, delete revision, revision, delete draft, draft, delete trash, trash, delete spam, spam, delete auto draft, auto draft, delete postmeta, postmeta, delete commentmeta, commentmeta, delete relationships, relationships, delete transient feed, transient feed, optimize database, database optimize, database optimizer, optimize, optimizer, reset database, database reset, reset, admin, widget, schedule, scheduler, schedule clean-up, schedule optimize, multisite, multi-site, network, cron, cron job, clean cron, clean scheduled tasks, view cron, view cron job, view scheduled tasks
5
Requires at least: 3.0.0
6
Tested up to: 4.3
7
- Stable tag: 1.3.5
8
License: GPLv2 or later
9
License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
@@ -56,6 +56,10 @@ This section describes how to install the plugin and get it working.
56
57
== Changelog ==
58
59
= 1.3.5 =
60
* New feature: Adding "Clean Cron". You can now clean unnecessary scheduled tasks.
61
* Updating FAQ
1
=== Advanced Database Cleaner ===
2
Contributors: symptote
3
+ Donate Link: http://www.sigmaplugin.com/donation
4
Tags: plugin, plugins, plugin wordpress, wordpress, database cleaner, clean database, database clean, database, clean, clean-up, clean up, cleanup, cleaner, delete orphan data, orphan data, delete revisions, delete revision, revision, delete draft, draft, delete trash, trash, delete spam, spam, delete auto draft, auto draft, delete postmeta, postmeta, delete commentmeta, commentmeta, delete relationships, relationships, delete transient feed, transient feed, optimize database, database optimize, database optimizer, optimize, optimizer, reset database, database reset, reset, admin, widget, schedule, scheduler, schedule clean-up, schedule optimize, multisite, multi-site, network, cron, cron job, clean cron, clean scheduled tasks, view cron, view cron job, view scheduled tasks
5
Requires at least: 3.0.0
6
Tested up to: 4.3
7
+ Stable tag: 1.3.6
8
License: GPLv2 or later
9
License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
56
57
== Changelog ==
58
59
+ = 1.3.6 =
60
+ * Fixing a problem in donate button
61
+ * Using _e() and __() for all texts in the plugin
62
+
63
= 1.3.5 =
64
* New feature: Adding "Clean Cron". You can now clean unnecessary scheduled tasks.
65
* Updating FAQ
advanced-db-cleaner.php CHANGED
@@ -4,7 +4,7 @@ defined( 'ABSPATH' ) or die( 'No direct access allowed' );
4
/*
5
Plugin Name: Advanced Database Cleaner
6
Description: Clean up your database by deleting unused data such as 'revision', optimize your database, or reset it to its initial state, etc.
7
- Version: 1.3.5
8
Author: Younes JFR.
9
Contributors: symptote
10
Text Domain: advanced-db-cleaner
@@ -16,7 +16,7 @@ License URI: http://www.gnu.org/licenses/gpl-2.0.html
16
/********************************************************************
17
* Define common variables
18
********************************************************************/
19
- if (!defined("ADB_CLEANER_PLUGIN_VERSION")) define("ADB_CLEANER_PLUGIN_VERSION", "1.3.5");
20
if (!defined("ADB_CLEANER_PLUGIN_BASENAME")) define("ADB_CLEANER_PLUGIN_BASENAME", plugin_basename(__FILE__));
21
if (!defined("ADB_CLEANER_PLUGIN_DIR")) define("ADB_CLEANER_PLUGIN_DIR", plugins_url() .'/'. dirname(plugin_basename(__FILE__)));
22
4
/*
5
Plugin Name: Advanced Database Cleaner
6
Description: Clean up your database by deleting unused data such as 'revision', optimize your database, or reset it to its initial state, etc.
7
+ Version: 1.3.6
8
Author: Younes JFR.
9
Contributors: symptote
10
Text Domain: advanced-db-cleaner
16
/********************************************************************
17
* Define common variables
18
********************************************************************/
19
+ if (!defined("ADB_CLEANER_PLUGIN_VERSION")) define("ADB_CLEANER_PLUGIN_VERSION", "1.3.6");
20
if (!defined("ADB_CLEANER_PLUGIN_BASENAME")) define("ADB_CLEANER_PLUGIN_BASENAME", plugin_basename(__FILE__));
21
if (!defined("ADB_CLEANER_PLUGIN_DIR")) define("ADB_CLEANER_PLUGIN_DIR", plugins_url() .'/'. dirname(plugin_basename(__FILE__)));
22
images/donate.gif ADDED
Binary file
includes/clean-cron.php CHANGED
@@ -5,7 +5,9 @@
5
<div style="margin-bottom:15px;">
6
<a class="tooltips" href="#">
7
<img src="<?php echo ADB_CLEANER_PLUGIN_DIR . '/images/about.png'?>"/>
8
- <span>The plugin has detected that you use a multisite installation. This is your main site from which you can manage all scheduled tasks in all sites of your network. Other sites can manage their own scheduled tasks only.</span>
9
</a>
10
</div>
11
<?php } ?>
5
<div style="margin-bottom:15px;">
6
<a class="tooltips" href="#">
7
<img src="<?php echo ADB_CLEANER_PLUGIN_DIR . '/images/about.png'?>"/>
8
+ <span>
9
+ <?php _e('The plugin has detected that you use a multisite installation. This is your main site from which you can manage all scheduled tasks in all sites of your network. Other sites can manage their own scheduled tasks only.', 'advanced-db-cleaner'); ?>
10
+ </span>
11
</a>
12
</div>
13
<?php } ?>
includes/clean-db.php CHANGED
@@ -8,7 +8,11 @@ $aDBc_count_unused = adv_db_cleaner_count();
8
<div style="margin-bottom:15px;">
9
<a class="tooltips" href="#">
10
<img src="<?php echo ADB_CLEANER_PLUGIN_DIR . '/images/about.png'?>"/>
11
- <span>The plugin has detected that you use a multisite installation. This is your main site from which you can clean all tables of all sites in your network. Other sites can clean their own tables only.</span>
12
</a>
13
</div>
14
<?php } ?>
@@ -182,15 +186,15 @@ $aDBc_count_unused = adv_db_cleaner_count();
182
<div style="text-align:center; margin-bottom: 30px">
183
<?php if($aDBc_count_unused["total"] == 0){ ?>
184
<img src="<?php echo ADB_CLEANER_PLUGIN_DIR . '/images/db_clean.png'?>"/>
185
- <div style="font-color:#ccc; color: #999; font-family: tahoma">Your database is clean!</div>
186
<?php } else { ?>
187
<img src="<?php echo ADB_CLEANER_PLUGIN_DIR . '/images/db_not_clean.png'?>"/>
188
- <div style="font-color:#ccc; color: #999; font-family: tahoma"><b><?php echo $aDBc_count_unused["total"]; ?></b> element(s) should be cleaned!</div>
189
<?php } ?>
190
</div>
191
192
<div class="aDBCRightBox" style="border-bottom: 1px solid #eee">
193
- <div style="font-weight: bold; padding-bottom:12px; color:#111; font-size:13px">&nbsp;Schedule</div>
194
<form action="" method="post">
195
<select style="height:30px; font-size:13px; width: 240px" name="aDBc_clean_schedule" id="aDBc_clean_schedule">
196
<option value="no_schedule" <?php echo get_option('aDBc_clean_schedule') == 'no_schedule' ? 'selected="selected"' : ''; ?>>
@@ -215,14 +219,14 @@ $aDBc_count_unused = adv_db_cleaner_count();
215
<input type="hidden" name="aDBc_clean_schedule_form" value="" />
216
<input style="height:30px" type="submit" class="button-primary" value="<?php _e('Save','advanced-db-cleaner'); ?>" />
217
</form>
218
- <div style="padding-top:15px; color:#111;">&nbsp;Next run: <span style="color: green"><?php echo wp_next_scheduled('aDBc_clean_scheduler') == true ? date('Y/m/d H:i:s', wp_next_scheduled('aDBc_clean_scheduler')) : 'Not set'; ?></span></div>
219
</div>
220
221
<div class="aDBCRightBox">
222
- <div style="font-weight: bold; padding-bottom:5px; color:#111; font-size:13px">&nbsp;Please note that</div>
223
<ul style="list-style: disc outside none; padding:0px 10px 0px 10px">
224
- <li>Cleaning your database helps you saving space by removing unused data.</li>
225
- <li>The following items are already cleaned:</li>
226
</ul>
227
<?php
228
if($aDBc_count_unused["revision"] == 0)
8
<div style="margin-bottom:15px;">
9
<a class="tooltips" href="#">
10
<img src="<?php echo ADB_CLEANER_PLUGIN_DIR . '/images/about.png'?>"/>
11
+ <span>
12
+ <?php
13
+ _e('The plugin has detected that you use a multisite installation. This is your main site from which you can clean all tables of all sites in your network. Other sites can clean their own tables only.', 'advanced-db-cleaner');
14
+ ?>
15
+ </span>
16
</a>
17
</div>
18
<?php } ?>
186
<div style="text-align:center; margin-bottom: 30px">
187
<?php if($aDBc_count_unused["total"] == 0){ ?>
188
<img src="<?php echo ADB_CLEANER_PLUGIN_DIR . '/images/db_clean.png'?>"/>
189
+ <div style="font-color:#ccc; color: #999; font-family: tahoma"><?php _e('Your database is clean!','advanced-db-cleaner'); ?></div>
190
<?php } else { ?>
191
<img src="<?php echo ADB_CLEANER_PLUGIN_DIR . '/images/db_not_clean.png'?>"/>
192
+ <div style="font-color:#ccc; color: #999; font-family: tahoma"><b><?php echo $aDBc_count_unused["total"]; ?></b> <?php _e('element(s) should be cleaned!','advanced-db-cleaner'); ?></div>
193
<?php } ?>
194
</div>
195
196
<div class="aDBCRightBox" style="border-bottom: 1px solid #eee">
197
+ <div style="font-weight: bold; padding-bottom:12px; color:#111; font-size:13px">&nbsp;<?php _e('Schedule','advanced-db-cleaner'); ?></div>
198
<form action="" method="post">
199
<select style="height:30px; font-size:13px; width: 240px" name="aDBc_clean_schedule" id="aDBc_clean_schedule">
200
<option value="no_schedule" <?php echo get_option('aDBc_clean_schedule') == 'no_schedule' ? 'selected="selected"' : ''; ?>>
219
<input type="hidden" name="aDBc_clean_schedule_form" value="" />
220
<input style="height:30px" type="submit" class="button-primary" value="<?php _e('Save','advanced-db-cleaner'); ?>" />
221
</form>
222
+ <div style="padding-top:15px; color:#111;">&nbsp;<?php _e('Next run:','advanced-db-cleaner'); ?> <span style="color: green"><?php echo wp_next_scheduled('aDBc_clean_scheduler') == true ? date('Y/m/d H:i:s', wp_next_scheduled('aDBc_clean_scheduler')) : 'Not set'; ?></span></div>
223
</div>
224
225
<div class="aDBCRightBox">
226
+ <div style="font-weight: bold; padding-bottom:5px; color:#111; font-size:13px">&nbsp;<?php _e('Please note that','advanced-db-cleaner'); ?></div>
227
<ul style="list-style: disc outside none; padding:0px 10px 0px 10px">
228
+ <li><?php _e('Cleaning your database helps you saving space by removing unused data.','advanced-db-cleaner'); ?></li>
229
+ <li><?php _e('The following items are already cleaned:','advanced-db-cleaner'); ?></li>
230
</ul>
231
<?php
232
if($aDBc_count_unused["revision"] == 0)
includes/optimize-db.php CHANGED
@@ -5,7 +5,11 @@
5
<div style="margin-bottom:15px;">
6
<a class="tooltips" href="#">
7
<img src="<?php echo ADB_CLEANER_PLUGIN_DIR . '/images/about.png'?>"/>
8
- <span>The plugin has detected that you use a multisite installation. This is your main site from which you can optimize all tables of all sites in your network. Other sites can optimize their own tables only.</span>
9
</a>
10
</div>
11
<?php } ?>
@@ -59,15 +63,15 @@
59
<div style="text-align:center; margin-bottom: 30px">
60
<?php if($total_lost == 0){ ?>
61
<img src="<?php echo ADB_CLEANER_PLUGIN_DIR . '/images/db_clean.png'?>"/>
62
- <div style="font-color:#ccc; color: #999; font-family: tahoma">Your database is optimized!</div>
63
<?php } else { ?>
64
<img src="<?php echo ADB_CLEANER_PLUGIN_DIR . '/images/db_not_clean.png'?>"/>
65
- <div style="font-color:#ccc; color: #999; font-family: tahoma"><b><?php echo $total_tables_to_optimize; ?></b> table(s) should be optimized!</div>
66
<?php } ?>
67
</div>
68
69
<div class="aDBCRightBox" style="border-bottom: 1px solid #eee">
70
- <div style="font-weight: bold; padding-bottom:12px; color:#111; font-size:13px">&nbsp;Schedule</div>
71
<form action="" method="post">
72
<select style="height:30px; width: 240px; font-size:13px" name="aDBc_optimize_schedule" id="aDBc_optimize_schedule">
73
<option value="no_schedule" <?php echo get_option('aDBc_optimize_schedule') == 'no_schedule' ? 'selected="selected"' : ''; ?>>
@@ -92,15 +96,15 @@
92
<input type="hidden" name="aDBc_optimize_schedule_form" value="" />
93
<input style="height:30px" type="submit" class="button-primary" value="<?php _e('Save','advanced-db-cleaner'); ?>" />
94
</form>
95
- <div style="padding-top:15px; color:#111">&nbsp;Next run: <span style="color: green"><?php echo wp_next_scheduled('aDBc_optimize_scheduler') == true ? date('Y/m/d H:i:s', wp_next_scheduled('aDBc_optimize_scheduler')) : 'Not set'; ?></span></div>
96
</div>
97
98
<div class="aDBCRightBox">
99
- <div style="font-weight: bold; padding-bottom:5px; color:#111; font-size:13px">&nbsp;Please note that</div>
100
<ul style="list-style: disc outside none; padding:0px 10px 0px 10px">
101
- <li>"Optimizing" reduces storage space and improves efficiency when accessing your tables.</li>
102
- <li>Except tables listed in the table above, all your other tables are already optimized.</li>
103
- <li>It is not necessary to run the optimization frequently, just do it from time to time.</li>
104
</ul>
105
</div>
106
</div>
5
<div style="margin-bottom:15px;">
6
<a class="tooltips" href="#">
7
<img src="<?php echo ADB_CLEANER_PLUGIN_DIR . '/images/about.png'?>"/>
8
+ <span>
9
+ <?php
10
+ _e('The plugin has detected that you use a multisite installation. This is your main site from which you can optimize all tables of all sites in your network. Other sites can optimize their own tables only.','advanced-db-cleaner');
11
+ ?>
12
+ </span>
13
</a>
14
</div>
15
<?php } ?>
63
<div style="text-align:center; margin-bottom: 30px">
64
<?php if($total_lost == 0){ ?>
65
<img src="<?php echo ADB_CLEANER_PLUGIN_DIR . '/images/db_clean.png'?>"/>
66
+ <div style="font-color:#ccc; color: #999; font-family: tahoma"><?php _e('Your database is optimized!','advanced-db-cleaner'); ?></div>
67
<?php } else { ?>
68
<img src="<?php echo ADB_CLEANER_PLUGIN_DIR . '/images/db_not_clean.png'?>"/>
69
+ <div style="font-color:#ccc; color: #999; font-family: tahoma"><b><?php echo $total_tables_to_optimize; ?></b> <?php _e('table(s) should be optimized!','advanced-db-cleaner'); ?></div>
70
<?php } ?>
71
</div>
72
73
<div class="aDBCRightBox" style="border-bottom: 1px solid #eee">
74
+ <div style="font-weight: bold; padding-bottom:12px; color:#111; font-size:13px">&nbsp;<?php _e('Schedule','advanced-db-cleaner'); ?></div>
75
<form action="" method="post">
76
<select style="height:30px; width: 240px; font-size:13px" name="aDBc_optimize_schedule" id="aDBc_optimize_schedule">
77
<option value="no_schedule" <?php echo get_option('aDBc_optimize_schedule') == 'no_schedule' ? 'selected="selected"' : ''; ?>>
96
<input type="hidden" name="aDBc_optimize_schedule_form" value="" />
97
<input style="height:30px" type="submit" class="button-primary" value="<?php _e('Save','advanced-db-cleaner'); ?>" />
98
</form>
99
+ <div style="padding-top:15px; color:#111">&nbsp;<?php _e('Next run:','advanced-db-cleaner'); ?> <span style="color: green"><?php echo wp_next_scheduled('aDBc_optimize_scheduler') == true ? date('Y/m/d H:i:s', wp_next_scheduled('aDBc_optimize_scheduler')) : 'Not set'; ?></span></div>
100
</div>
101
102
<div class="aDBCRightBox">
103
+ <div style="font-weight: bold; padding-bottom:5px; color:#111; font-size:13px">&nbsp;<?php _e('Please note that','advanced-db-cleaner'); ?></div>
104
<ul style="list-style: disc outside none; padding:0px 10px 0px 10px">
105
+ <li><?php _e('"Optimizing" reduces storage space and improves efficiency when accessing your tables.','advanced-db-cleaner'); ?></li>
106
+ <li><?php _e('Except tables listed in the table above, all your other tables are already optimized.','advanced-db-cleaner'); ?></li>
107
+ <li><?php _e('It is not necessary to run the optimization frequently, just do it from time to time.','advanced-db-cleaner'); ?></li>
108
</ul>
109
</div>
110
</div>
includes/reset-db.php CHANGED
@@ -7,22 +7,24 @@ if (!isset($aDBc_admin->user_login ) || $aDBc_admin->user_level < 10 ){
7
}
8
?>
9
<div class="box-warning">
10
- <span style="color: #EA823A; font-weight:bold">WARNING:</span> The reset makes a fresh installation of your database. Therefore, ANY data in your database will be lost. This option is used primarily by developers who are testing their websites and who do not want to install wordpress after each test. Please do not use this option if you want to keep your posts and pages.
11
</div>
12
<div class="box-info">
13
<ul style="list-style: disc outside none;">
14
- <li>The reset does not delete or modify any of your plugins files or server files.</li>
15
- <li>All your plugins will be deactivated (including this one). You should activate them manually after the reset.</li>
16
<?php if ($aDBc_admin_exists) { ?>
17
- <li>The '<strong>admin</strong>' user exists and will be recreated with its <strong>current password</strong>.</li>
18
<?php } else {?>
19
- <li>The 'admin' user does not exist. The user '<strong><?php echo esc_html( $current_user->user_login ); ?></strong>' will be recreated with its <strong>current password</strong> with user level 10.</li>
20
<?php } ?>
21
- <li>After the reset, you will be redirected to the admin login page.</li>
22
</ul>
23
</div>
24
- <h3 style="color:#32373c; padding-top: 10px">Reset database</h3>
25
- <p>Type '<strong>reset</strong>' in the confirmation field below to confirm the reset and then click the reset button.</p>
26
<form id="wordpress_reset_form" action="" method="post">
27
<input type="hidden" name="aDBc_reset_form" value="" />
28
<input type="text" name="aDBc_reset_comfirmation" value="" />
7
}
8
?>
9
<div class="box-warning">
10
+ <span style="color: #EA823A; font-weight:bold"><?php _e('WARNING:','advanced-db-cleaner'); ?></span>
11
+ <?php _e('The reset makes a fresh installation of your database. Therefore, ANY data in your database will be lost. This option is used primarily by developers who are testing their websites and who do not want to install wordpress after each test. Please do not use this option if you want to keep your posts and pages.','advanced-db-cleaner'); ?>
12
+
13
</div>
14
<div class="box-info">
15
<ul style="list-style: disc outside none;">
16
+ <li><?php _e('The reset does not delete or modify any of your plugins files or server files.','advanced-db-cleaner'); ?></li>
17
+ <li><?php _e('All your plugins will be deactivated (including this one). You should activate them manually after the reset.','advanced-db-cleaner'); ?></li>
18
<?php if ($aDBc_admin_exists) { ?>
19
+ <li><?php _e('The "<strong>admin</strong>" user exists and will be recreated with its <strong>current password</strong>.','advanced-db-cleaner'); ?></li>
20
<?php } else {?>
21
+ <li><?php _e('The "admin" user does not exist.','advanced-db-cleaner'); ?> <?php _e('The user','advanced-db-cleaner'); ?> '<strong><?php echo esc_html( $current_user->user_login ); ?></strong>' <?php _e('will be recreated with its current password with user level 10.','advanced-db-cleaner'); ?></li>
22
<?php } ?>
23
+ <li><?php _e('After the reset, you will be redirected to the admin login page.','advanced-db-cleaner'); ?></li>
24
</ul>
25
</div>
26
+ <h3 style="color:#32373c; padding-top: 10px"><?php _e('Reset database','advanced-db-cleaner'); ?></h3>
27
+ <p><?php _e('Type "<strong>reset</strong>" in the confirmation field below to confirm the reset and then click the reset button.','advanced-db-cleaner'); ?></p>
28
<form id="wordpress_reset_form" action="" method="post">
29
<input type="hidden" name="aDBc_reset_form" value="" />
30
<input type="text" name="aDBc_reset_comfirmation" value="" />
includes/sidebar.php CHANGED
@@ -3,18 +3,9 @@
3
<p style="text-align: justify"><?php _e('If you love this plugin and would like to make a donation, then you\'re awesome.', 'advanced-db-cleaner'); ?></p>
4
<p style="text-align:right"><?php _e('Thank you!', 'advanced-db-cleaner'); ?></p>
5
<center>
6
- <!-- Donate -->
7
- <form action="https://www.paypal.com/cgi-bin/webscr" method="post" target="_top">
8
- <input type="hidden" name="cmd" value="_donations">
9
- <input type="hidden" name="business" value="younes.jfr@gmail.com">
10
- <input type="hidden" name="lc" value="US">
11
- <input type="hidden" name="item_name" value="Advanced Database Cleaner">
12
- <input type="hidden" name="no_note" value="0">
13
- <input type="hidden" name="currency_code" value="USD">
14
- <input type="hidden" name="bn" value="PP-DonationsBF:btn_donate_LG.gif:NonHostedGuest">
15
- <input type="image" src="https://www.paypalobjects.com/en_US/i/btn/btn_donate_LG.gif" border="0" name="submit" alt="PayPal - The safer, easier way to pay online!">
16
- <img alt="" border="0" src="https://www.paypalobjects.com/fr_XC/i/scr/pixel.gif" width="1" height="1">
17
- </form>
18
</center>
19
</div>
20
3
<p style="text-align: justify"><?php _e('If you love this plugin and would like to make a donation, then you\'re awesome.', 'advanced-db-cleaner'); ?></p>
4
<p style="text-align:right"><?php _e('Thank you!', 'advanced-db-cleaner'); ?></p>
5
<center>
6
+ <a href="http://www.sigmaplugin.com/donation" target="_blank">
7
+ <img src="https://www.paypalobjects.com/en_US/i/btn/btn_donate_LG.gif"/>
8
+ </a>
9
</center>
10
</div>
11
screenshot-1.png DELETED
Binary file
screenshot-2.png DELETED
Binary file
screenshot-3.png DELETED
Binary file
screenshot-4.png DELETED
Binary file
screenshot-5.png DELETED
Binary file
screenshot-6.png DELETED
Binary file