Programming Languages ​​Used in the Backend

- PHP (Required):
- Because WordPress is built on PHP, to ensure full compatibility, use the latest version (PHP 8.0+ for improved performance).

Databases:

When programming this WordPress plugin, use the Options API only to store statistics (the number of times the tool is used daily, weekly, monthly, and yearly).

Do not use any custom databases, WP_Query, or Post Types for this purpose.

➤ Create static Option keys such as:
suggester_daily_count, suggester_weekly_count, suggester_monthly_count, suggester_yearly_count, with suggester_last_reset_dates to track the last time each counter was reset.

➤ Make sure all values ​​are integers (ints), without complex syntax, and within the built-in options table in WordPress.

Main reason: The Options API is the most efficient and lightweight way to store small amounts of variable data in WordPress. The values ​​are automatically loaded in autoload, making them very fast to access without requiring additional database queries. This is ideal for lightweight applications like the general statistics in this free plugin.

Do not use Transients or Custom Tables in this case, as they are either unnecessary or add performance overhead without any real value.

Suggested techniques for improving performance:

When developing this plugin for WordPress, use AJAX to implement keyword submissions and receive suggestions from the Google Gemini API.
Do not use the REST API in this version, as AJAX via admin-ajax.php is better integrated with the WordPress environment and does not require complex permissions or custom headers. It also provides direct integration with sessions and users, if any. To execute Google Gemini API requests, use wp_remote_post() normally and directly within the AJAX Collapsible. Don't attempt to use a non-blocking or external async method, as PHP and WordPress don't support this without significant complications that aren't suitable for the free version of the plugin.
On the front end, add a simple status indicator (such as three animated dots) that displays when the "Suggest" button is clicked until the server response is complete. This visually improves the user experience and avoids any impression of slowness or freezing of the interface.

Reason:
AJAX avoids page reloads and provides a fluid and smooth user experience.

wp_remote_post() is sufficient to safely and quickly execute API calls within the AJAX Collapsible.

The visual indicator compensates for the lack of a true Async and makes the experience interactive without the need for unofficially supported technologies.