Pars Optimizer

By Pars Host Developer Team

0+ active installationsVersion 1.2.02

Pars Optimizer is a comprehensive optimization plugin designed to speed up your website, enhance security, and beautify your WordPress admin panel.

Description

Crafted with 💙 by the programmers and developers at Pars.host, Pars Optimizer is programmed to significantly enhance your website’s load speed, ensuring a seamless and faster user experience. Say goodbye to slow loading times!

Pars Optimizer is not just a speed plugin; it’s a complete toolkit for WordPress efficiency. It combines security features, performance optimizations, and UI enhancements in one lightweight package.

Key Features:

🚀 Performance & Speed
* Minify CSS & JS: Compress your style and script files to reduce size.
* Merge Assets: Combine multiple CSS/JS files into one to reduce HTTP requests.
* Lazy Load: Built-in lazy loading for Images and Iframes to speed up initial page load.
* Remove Comments: Automatically strips HTML comments from your source code.
* Preload Resources: Easily define critical assets (fonts, CSS, JS) to preload for better Core Web Vitals.

🛡️ Security Enhancements
* Hide Login URL: Change your default wp-admin and wp-login.php to a custom slug (e.g., /my-login) to prevent brute-force attacks.
* Force SSL: Enforce HTTPS redirection for both the admin dashboard and the frontend.

🛒 WooCommerce Optimization
* Disable Tracking: Stop WooCommerce from tracking usage data to speed up your backend.

🎨 Admin Interface & Fonts
* Persian Font (Yekan Bakh): Beautiful “Yekan Bakh” font integration for both the Admin Dashboard and Frontend.
* Modern Admin Theme: A sleek, dark/modern theme for the WordPress dashboard to improve the management experience.

☁️ Pars CDN integration (optional)
* Connect with an API token: paste a token from the Pars panel to link the site to your CDN domain. Nothing is sent to Pars CDN until you do.
* Automatic purging: publishing, editing or deleting content, and comment changes, queue the affected URLs and send them as one batched request a few minutes later — never during the editor request.
* Purge everything / purge this page: a button on the CDN screen, and a “Purge this page” item in the admin bar.
* Correct visitor IP and HTTPS: restores the real visitor address behind the edge, and prevents the redirect loop that otherwise happens when “Force SSL” meets the CDN’s flexible SSL mode.
* Safe cache lifetime: keeps anonymous pages cached for less time than a WordPress security token lives, so cached forms do not break.

🌍 Fully Translatable
* Every string in the interface is translatable, and a complete Persian (fa_IR) translation ships with the plugin.
* The admin screens are built with CSS logical properties, so the whole interface mirrors correctly for right-to-left languages.

External services

This plugin can connect to the Pars CDN customer API at my.pars.cloud. The connection is entirely optional and is used only for the CDN features listed above.

Nothing is sent to any external service until you save a Pars CDN API token on the Optimizer → CDN screen. With no token saved, the plugin makes no outbound requests at all.

Once a token is saved, the plugin contacts https://my.pars.cloud in these cases:

  • When you save the token or press Reconnect — it sends the token to /api/v1/user/tokens/current to verify it, and to /api/v1/user/domains to find which of your CDN domains covers this site. This sends your API token and reads back the domain name, its id, its status and the token’s abilities and expiry date.
  • When cache is purged — automatically after content changes, or when you press a purge button. This sends your API token, the CDN domain id, and the list of page URLs to be removed from the cache.
  • When purge progress is displayed — it sends your API token and a task id to /api/v1/user/tasks/{id}.
  • Once a day while connected — it fetches the public list of CDN edge server addresses from https://my.pars.cloud/ips?format=json, so that forwarded visitor IP headers can be trusted only when a request genuinely arrives from a Pars CDN server. This request sends no token and no personal data.

No visitor data, post content or personal information is ever transmitted. The service is provided by Pars Host; its terms are available at https://pars.host/tos/.

Installation

  1. Upload the plugin files to the /wp-content/plugins/pars-optimo directory, or install the plugin through the WordPress plugins screen directly.
  2. Activate the plugin through the ‘Plugins’ screen in WordPress.
  3. Use the Optimizer menu to configure the settings.
  4. Go to the Analysis tab to check your website’s optimization score.

FAQ

Does this plugin work with other caching plugins?

Yes, Pars Optimizer is designed to be lightweight and compatible. However, if you use another plugin for Minify/Merge functionality (like Autoptimize), we recommend disabling those specific features in one of the plugins to avoid conflicts.

How do I change my login URL?

Go to Optimizer > Settings > Security. Enable “Hide Login URL”, enter your desired slug (e.g., secret-login), and save. Important: If you get a 404 error, go to Settings > Permalinks and just click “Save Changes” to flush the rewrite rules.

What if I get locked out after changing the login URL?

Simply rename the pars-optimo folder in wp-content/plugins/ via FTP or File Manager to deactivate the plugin. Then you can access wp-login.php again.

Is the plugin available in Persian?

Yes. A complete Persian (fa_IR) translation is bundled. Set your site language to فارسی under Settings > General and the whole interface switches over, including right-to-left layout.

Do I need a Pars CDN account to use this plugin?

No. Every optimization, security and appearance feature works on any host, with no account and no outbound connection. The CDN screen stays dormant until you choose to paste an API token.

Which abilities does the Pars CDN API token need?

domains:read and cache:purge are required, and tasks:read is recommended so purge progress can be shown. Limit the token to this site’s domain. If an ability is missing, the CDN screen names it.

My site redirects in a loop after enabling Force SSL behind the CDN.

That happens when the CDN uses flexible SSL, where the edge reaches your server over plain HTTP, so WordPress believes the visitor is not on HTTPS. Connect the CDN integration: it reads the edge’s forwarded protocol header and tells WordPress the truth before any redirect runs. The header is only trusted when the request actually comes from a Pars CDN address.

How can I translate the plugin into my own language?

A languages/pars-optimo.pot template is included. You can also translate the plugin on translate.wordpress.org, and the resulting language pack will be picked up automatically.

Screenshots

Changelog

1.2.02

  • Added: A CDN entry in the plugin’s own sidebar. It appears on every Pars Optimizer screen, so the CDN page is one click from the settings rather than only from the WordPress admin menu.
  • Changed: The CDN screen has been rebuilt around the same layout as the settings screen — the same top bar, the same sidebar, the same cards. The connection is summarised by three meters (setup steps completed, token abilities granted, automatic purging), and the flat table of details is replaced by a status list whose rows open to explain themselves. A “Quick access” panel collects the actions that were previously scattered down the page.
  • Changed: The sidebar is now a single shared template rendered by every screen, so an item can no longer exist on one screen and be missing from another. The settings screen still drives its sections as in-page tabs; the other screens render the same list as links.
  • Added: Persian (fa_IR) translations for all of the new interface text. The bundled catalogue covers every string in the plugin again, and seven strings that no longer exist were dropped from it.
  • Note: The plugin’s display name on WordPress.org is now “Pars Optimizer” rather than the slug, and the tag list has been trimmed to the five tags WordPress.org accepts — the sixth, “lazy load”, was being ignored at import.

1.2.01

  • Added: Pars CDN integration. Connect the site to your CDN domain with an API token from the Pars panel, under Optimizer → CDN.
  • Added: Automatic cache purging when content changes. Affected URLs — the post, the home page, the posts page, its taxonomy archives, its author archive, the feed and the post type archive — are queued and sent as a single batched request after a delay, never during the editor request itself.
  • Added: “Purge everything” on the CDN screen and “Purge this page” in the admin bar. Administrators always have both; editors can be given the single-page purge.
  • Added: Purge progress is polled and reported, including the case where an edge does not confirm.
  • Added: The real visitor IP is restored behind the CDN, but forwarded headers are trusted only when the request genuinely arrives from an address on the published edge list — a spoofed header sent straight to the origin is ignored.
  • Added: HTTPS detection behind the edge. With the CDN’s flexible SSL mode the edge reaches the origin over plain HTTP, which previously made the plugin’s own “Force SSL” option redirect in a loop.
  • Added: An optional ten-hour edge lifetime for anonymous pages, deliberately under the twelve-hour life of a WordPress security token so cached pages cannot serve a dead one. Logged-in, preview, search, 404, feed and WooCommerce cart, checkout and account pages are excluded.
  • Added: A rebuild of the minify or merge cache now fires a pars_optimizer_asset_rebuilt action, and queues the new file and the home page for purging.
  • Added: Whole-site events — saving a menu or the Customizer, switching theme, or updating a plugin, theme or WordPress — raise a notice with a “Purge everything now” button instead of purging automatically, because plans allow only a limited number of whole-site purges per day.
  • Security: The API token is stored in a non-autoloaded option, encrypted with a key derived from AUTH_KEY, is never displayed again beyond its last four characters, and is deleted on uninstall. It can also be pinned with a PARS_CDN_API_TOKEN constant in wp-config.php, which takes precedence. Every form, link and AJAX call is nonce-checked and capability-checked.
  • Fixed: Headings on the plugin’s own screens, and across the dashboard when “Yekan Bakh in the dashboard” was enabled, could fall back to another font. They only inherited the family rather than declaring it, and a declaration on an element always beats an inherited value — so a single global h1, h2 { font-family: … } from any other admin stylesheet quietly reclaimed every heading while body text stayed correct. Headings now carry the family themselves. Only the family is set; size and weight are untouched.
  • Fixed: The bundled webfont was only loaded on the plugin’s screens for right-to-left locales, leaving an English dashboard with nothing to fall back on. It is now loaded in every locale.
  • Note: The readme now documents every request made to my.pars.cloud, as required for plugins that use external services.

1.1.1

  • Fixed: Text rendered a full weight heavier than intended everywhere the Yekan Bakh font was active. The bundled @font-face block mapped font-weight: 400 — normal body text — to the SemiBold file, and 700 to ExtraBold, so there was no way for any stylesheet to ask for true Regular. Weights are now mapped to the files they actually belong to (400 = Regular, 600 = SemiBold, 700 = Bold).
  • Fixed: The font stylesheet also applied global typography of its own: body and h1–h6 had their font family forced with !important, every heading was pinned to font-weight: 700, and h1–h6 were given fixed pixel sizes (40px/32px/24px/18px/16px/14px). Simply enabling the font therefore overrode the heading scale of the active theme and of the WordPress dashboard. The file now only registers the family; applying it is handled by the stylesheets tied to each option.
  • Fixed: woff was listed before woff2 in every @font-face, so modern browsers downloaded the larger file. woff2 now comes first.
  • Fixed: The ExtraBold @font-face pointed its woff2 source at the .woff file.
  • Changed: The admin interface now uses a deliberate type scale — six whole-pixel sizes and only two weights (Regular for text, SemiBold for emphasis), with hierarchy carried by size and colour rather than heavy weights.
  • Changed: Persian typography is handled separately from Latin: more line height, no letter-spacing (which breaks the joined baseline of Arabic-script text), and the webfont leads the stack only in right-to-left locales so Latin interfaces keep the system font.
  • Changed: Counters and scores use tabular figures so numbers no longer shift their neighbours as they change.

1.1.0

  • Fixed: “Remove HTML Comments” used an invalid regular expression that made preg_replace() return NULL, which served a completely blank page on the front end. The pattern is rewritten (IE conditional comments are now preserved) and every buffered replacement falls back to the original markup if a match ever fails.
  • Fixed: The Yekan Bakh font options had no effect. The bundled @font-face registers the family as yekan-bakh, but the stylesheet asked for Yekan Bakh. The font now applies on both the dashboard and the front end, and the two options work independently of the admin theme.
  • Fixed: The deactivation routine was registered with register_activation_hook(), so it ran on activation and never on deactivation.
  • Fixed: Default options written at activation used a lazy_load key that no longer exists, instead of lazy_load_images / lazy_load_iframe.
  • Added: Full internationalization. Every interface string now runs through the translation API, with a bundled Persian (fa_IR) translation and a .pot template.
  • Added: Text domain corrected to pars-optimo so it matches the plugin slug — language packs from translate.wordpress.org can now load.
  • Added: Redesigned admin interface — sidebar navigation with live per-section counters, a settings search filter, a sticky save bar with unsaved-change warnings, deep-linkable tabs, and an overview screen with scores and actionable next steps.
  • Added: Right-to-left support throughout, implemented with CSS logical properties so there is no separate RTL stylesheet.
  • Added: Keyboard-accessible tabs with proper ARIA roles, visible focus styles, and prefers-reduced-motion support.
  • Added: “Settings” shortcut link on the Plugins screen, and a confirmation notice after saving.
  • Added: The Analysis screen now explains each failed check and links straight to the setting that resolves it.
  • Changed: Settings are now declared in a single schema that drives the interface, the counters and validation, so the three can no longer drift apart.
  • Changed: Removed an unprefixed global return_no() function from the global namespace.

1.0.0

  • Initial release.
  • Added Security features (Hide Login, Force SSL).
  • Added Optimization features (Minify, Merge, Lazy Load).
  • Added WooCommerce optimization.
  • Added Admin Theme and Custom Fonts.