Process bulk update actions
I have found myself doing code duplication from time to time, and often will find them in the code. It screams at you "fix me!".

I would recommend a book, Refactoring by Martin Fowler on Amazon. It is an excellent resource and has step to step guides to refactoring code as the example you provided here.

Using Martin Fowlers techniques, I refactored the second half of your code step by step. The first thing was to simplify the conditionals:

if ( ( isset( $_POST['action'] ) &amp;&amp; $_POST['action'] == 'bulk-reset' )
     || ( isset( $_POST['action2'] ) &amp;&amp; $_POST['action2'] == 'bulk-reset' )
) {


Became a query instead:

if($this-&gt;isBulkReset()) {
...

protected function isBulkReset() {
    return $this-&gt;isBulkAction('bulk-reset');
}

protected function isBulkDelete() {
    return $this-&gt;isBulkAction('bulk-delete');
}

protected function isBulkAction($action) {
    return (isset($_POST['action']) &amp;&amp; $_POST['action'] == $action)
    || (isset($_POST['action2']) &amp;&amp; $_POST['action2'] == $action);
}


Next I looked at some similarities in the functions, like these two:

$delete_ids = esc_sql( $_POST['my_CheckBoxes'] );
$reset_ids = esc_sql( $_POST['my_CheckBoxes'] );


I changed them in both functions:

$recordIds = $this-&gt;getRecordIds();

foreach ($recordIds as $id) {
...
protected function getRecordIds() {
    return esc_sql($_POST['my_CheckBoxes']);
}


Next I joined the two functions:

 if($this-&gt;isBulkDelete() || $this-&gt;isBulkReset()) {
        $recordIds = $this-&gt;getRecordIds();

        foreach ($recordIds as $id) {
            if($this-&gt;isBulkDelete()) {
                self::delete_customer($id);
            } else {
                self::reset_record($id);
            }
        }

        wp_redirect(esc_url(add_query_arg()));
        exit;
    }


Then I noticed that $recordIds is a totally unnecessary temporary variable, so I removed it and just did the query directly in the foreach:

if($this-&gt;isBulkDelete() || $this-&gt;isBulkReset()) {
    foreach ($this-&gt;getRecordIds() as $id) {
        if($this-&gt;isBulkDelete()) {
            self::delete_customer($id);
        } else {
            self::reset_record($id);
        }
    }
    wp_redirect(esc_url(add_query_arg()));
    exit;
}


This is how it typically progresses, small steps. But in the end, you will have more separation and cleaner code. The big secret here is that as you progress, you will see new ways in organising your code that you could not see before.

Heads up! This code is untested, simply example refactoring techniques.