You are an expert WordPress developer. Rewrite the MBSM Comment Spam Moderation plugin (original code provided below) following these strict requirements. Produce the full plugin code including main PHP file, JavaScript file, and uninstall.php.

## Required Fixes & Improvements

### 1. Security & Data Integrity
- Add `uninstall.php` that deletes all plugin options (`mbsm_csm_auto_delete`), clears the scheduled cron event, and removes comment meta keys (`_mbsm_original_author`, `_mbsm_original_content`).
- Implement a **daily cron job** that deletes spam comments older than 30 days **only if** the setting `mbsm_csm_auto_delete` is enabled.
- Move `comments.json` (rename to `replies.json`) to `/wp-content/uploads/mbsm-csm/`. On plugin activation, create the directory and a default `replies.json` file with at least 10 generic replies.
- In the AJAX "Smart Clean" handler, validate that the JSON file exists and is readable; provide a fallback array of default replies.
- Enforce a batch size limit (default 50) for the AJAX processing – both server‑side and client‑side.
- Before overwriting a comment, **backup the original `comment_author` and `comment_content`** as comment meta (keys: `_mbsm_original_author`, `_mbsm_original_content`). Make this backup optional via a filter `mbsm_csm_backup_original` (default true).
- Add a **JavaScript confirmation dialog** that clearly warns the user: "This will REPLACE the comment content and author name, remove links, and approve the comment. Original data will be backed up. Continue?"

### 2. Performance
- Use `WP_Comment_Query` with `'count' => true` to get total comment counts efficiently, not `get_comments()` with `'fields'=>'ids'`.
- Implement proper pagination with per‑page options (20, 50, 100, 200).

### 3. Code Quality & Best Practices
- Extract **all inline JavaScript** from the dashboard page into a separate file `assets/js/admin.js`. Enqueue it using `wp_enqueue_script` and pass AJAX URL, nonce, batch size, and confirmation message via `wp_localize_script`.
- Add **internationalisation** – every user‑facing string must use `__()`, `_e()`, or `esc_html__()` with text domain `mbsm-comment-spam-moderation`.
- Use proper escaping (`esc_html`, `esc_attr`, `esc_url`, `wp_kses_post`) throughout.
- Replace the placeholder "Updates" submenu page with a **real Settings page** that saves the auto‑delete spam option. Remove the "Updates" page entirely.
- In `handle_standard_bulk_actions`, verify nonce correctly and redirect with a success message count.
- Remove the unused `enqueue_admin_assets` method or implement it properly.

### 4. AJAX Smart Clean Logic
- Read `replies.json` from the uploads directory.
- Use a filtered array of safe names (provide a default list of 150+ international names, but allow filtering via `mbsm_csm_safe_names`).
- For each selected comment:
  - Backup original data if filter allows.
  - Replace author with a random safe name.
  - Replace content with a random reply from `replies.json`.
  - Clear the author URL.
  - Approve the comment (`comment_approved = 1`).
  - Handle `wp_update_comment` return value (false = error).
- Return JSON with arrays of successfully processed IDs and any errors.

### 5. User Interface
- Keep the existing dashboard layout (pending/spam tabs, per‑page dropdown, bulk actions).
- Add the "Smart Clean & Approve" button that triggers the batched AJAX process.
- Display a live log container showing batch progress and any errors.
- After each batch, remove the corresponding table rows from the DOM (fade out and delete).
- Preserve the "Select All" and per‑page filtering behaviour.

### 6. Activation / Deactivation
- On activation: schedule the daily cron event (`mbsm_csm_daily_cleanup`), create uploads directory and default `replies.json`.
- On deactivation: clear the scheduled cron event.

## Deliverables

Provide the complete code for three files, clearly labelled:

1. **`mbsm-comment-spam-moderation.php`** – Main plugin file (with proper headers, class `MBSM_CSM_Main`, singleton pattern).
2. **`assets/js/admin.js`** – JavaScript file.
3. **`uninstall.php`** – Uninstall file.

No placeholders or omissions – include everything needed for a production plugin.

## Original Plugin Code (to be replaced)

[Paste the original plugin code here – the one from the user's first message in this conversation.]