Code to remove authors with no posts connected to them

<?php

/**
 * Plugin Name: Delete Non Authors
 */

function delete_non_authors()
{
    global $wpdb;
    $non_authors = $wpdb->get_col(
        "SELECT DISTINCT $wpdb->users.ID FROM $wpdb->users
        LEFT JOIN $wpdb->posts ON $wpdb->users.ID = $wpdb->posts.post_author
        WHERE $wpdb->posts.ID IS NULL"
    );

    foreach ($non_authors as $user_ID)
        wp_delete_user($user_ID);
}
register_activation_hook(__FILE__, 'delete_non_authors');

?>

Drop this in a file, name it something like delete-non-authors.php, upload it to your plugins folder, activate, and you’re done! (You can then de-activate).

tech