=== Basic Optimization ===
Contributors: shahalom, microsolutions
Tags: performance, optimization, disable emojis, xml-rpc, heartbeat
Requires at least: 5.5
Tested up to: 6.9
Requires PHP: 7.4
Stable tag: 2.0.1
License: GPLv3
License URI: https://www.gnu.org/licenses/gpl-3.0.html

A lightweight WordPress optimization plugin for disabling selected default frontend and header outputs such as emojis, shortlinks, embeds, XML-RPC, self pingbacks, heartbeat, WordPress version output, and selected WordPress core auto email notifications.

== Description ==

Basic Optimization provides simple on/off controls for common WordPress cleanup and performance-related tweaks. It is intentionally small, dependency-free, and designed for site owners who want practical optimization controls without a large performance suite.

The plugin adds a **Basic Optimization** admin screen where administrators can enable or disable each feature independently. It also includes a child **Email Notifications** settings page for disabling selected WordPress core auto emails.

= Features =

* **Disable Emojis** - Removes WordPress emoji scripts, styles, filters, and emoji DNS prefetch output.
* **Remove Shortlink** - Removes the shortlink tag from the document head.
* **Remove CSS/JS Version** - Removes the `ver` query argument from enqueued stylesheet and script URLs.
* **Remove RSD Links** - Removes the Really Simple Discovery link from the document head.
* **Disable Embeds** - Removes WordPress oEmbed discovery links and dequeues the default `wp-embed` frontend script.
* **Disable XML-RPC** - Disables XML-RPC requests and removes the `X-Pingback` response header.
* **Remove WLW Manifest Link** - Removes the Windows Live Writer manifest link from the document head.
* **Disable Self Pingback** - Prevents self pingbacks when content links to the same site.
* **Hide WordPress Version** - Removes the WordPress generator meta tag from the document head.
* **Disable Heartbeat** - Deregisters the WordPress heartbeat script on the frontend.
* **Email Notifications** - Adds dropdown controls to disable selected WordPress core auto emails, including new user registration, password changed, comment moderation, and automatically approved comment notifications.

= Notes =

Some features can affect integrations that rely on WordPress defaults. For example, disabling XML-RPC can affect external publishing clients and services that still depend on XML-RPC. Disabling auto emails can also affect administrator awareness of user and comment activity. Disable only the features that match your site requirements.

== Installation ==

= From the WordPress dashboard =

1. Go to **Plugins > Add New**.
2. Click **Upload Plugin**.
3. Choose the plugin ZIP file.
4. Click **Install Now**.
5. Activate the plugin.
6. Go to **Basic Optimization** in the WordPress admin menu and configure the available settings.
7. Go to **Basic Optimization > Email Notifications** to disable selected WordPress core auto emails.

= Manual installation =

1. Upload the `basic-optimization` folder to the `/wp-content/plugins/` directory.
2. Activate the plugin through the **Plugins** screen in WordPress.
3. Go to **Basic Optimization** in the WordPress admin menu and configure the available settings.
4. Go to **Basic Optimization > Email Notifications** to disable selected WordPress core auto emails.

== Frequently Asked Questions ==

= Will this plugin change WordPress core files? =

No. The plugin does not modify WordPress core files. It uses WordPress hooks and options only.

= Can I enable or disable individual optimizations? =

Yes. Each optimization is managed separately from the plugin settings screen.

= Is disabling XML-RPC always recommended? =

No. Disable XML-RPC only if your site does not rely on XML-RPC-based tools, remote publishing apps, or services.

= Does removing CSS/JS version query strings improve performance? =

It may help in some caching or CDN setups, but it can also make cache invalidation less explicit. Use this option only if it fits your caching strategy.

= Where are the settings located? =

After activation, go to **Basic Optimization** in the WordPress admin menu for optimization controls. Email disable controls are available under **Basic Optimization > Email Notifications**.

= Which auto emails can be disabled? =

The plugin provides dropdown controls to disable the auto email sent to the site administrator when a new user registers, the auto email sent to the site administrator when a user changes their password, the moderation email sent when a comment awaits moderation, and the automatically approved comment notification email. WordPress sends the automatically approved comment notification to the post author, which may be the site administrator depending on the post author.

== Screenshots ==

1. Basic Optimization settings screen with individual on/off controls.
2. Email Notifications sub-settings screen with dropdown controls to disable selected WordPress core auto emails.

== Changelog ==

= 2.0.1 =
* Refactored plugin into a cleaner class-based structure.
* Added consistent prefixed option keys through the plugin helper function.
* Improved settings sanitization and admin redirect handling.
* Expanded embed cleanup to remove oEmbed discovery output.
* Updated repository-ready `readme.txt` metadata and documentation.
* Added GitHub-style `README.md` documentation.
* Added an Email Notifications sub-settings page with controls to disable selected WordPress core auto emails.

== Upgrade Notice ==

= 2.0.0 =
This release improves code structure, option-key handling, sanitization, and documentation. Review settings after updating to confirm the optimization options match your site requirements.
