-
Notifications
You must be signed in to change notification settings - Fork 130
Rebrand the plugin to EasyEngine Cache Helper #466
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
sarthak-19
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Minor suggestion, rest LGTM !
includes/class-cloudflare-client.php
Outdated
| 'kind' => 'zone', | ||
| 'phase' => 'http_request_cache_settings', | ||
| 'description' => 'Set\'s the edge cache rules by Nginx-Helper Cache Manager.', | ||
| 'description' => 'Set\'s the edge cache rules by Nginx-Helper Cache Helper.', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should be renamed from Nginx-Helper Cache Helper to EasyEngine Cache Helper ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR rebrands the plugin from "Nginx Helper" to "EasyEngine Cache Helper for Nginx & Cloudflare (formerly Nginx Helper)" as part of a broader rebranding initiative. The changes include namespace updates, option name changes, text domain corrections for i18n, and rebranding of links and assets to align with EasyEngine.
Key Changes:
- Namespace changed from
EasyCachetoEECacheHelperacross all PHP class files - WordPress option names updated from
easycache_cf_settingstoeasyengine_cache_manager_cf_settings - Text domain updated from 'easycache' to 'nginx-helper' for all translatable strings
- Updated branding assets including icons and external links
- Removed Support tab and updated navigation structure
Reviewed changes
Copilot reviewed 16 out of 22 changed files in this pull request and generated 10 comments.
Show a summary per file
| File | Description |
|---|---|
| nginx-helper.php | Updated plugin header with new name and description, updated WP-CLI command namespace |
| utils/autoloader.php | Changed autoloader namespace check from EasyCache to EECacheHelper |
| includes/class-nginx-helper.php | Updated namespace imports and option name in Cloudflare header handling |
| includes/class-cloudflare-tag-emitter.php | Updated namespace and package documentation |
| includes/class-cloudflare-purger.php | Updated namespace and use statements |
| includes/class-cloudflare-client.php | Updated namespace and ruleset descriptions for Cloudflare |
| includes/class-cli.php | Updated namespace for WP-CLI commands |
| admin/class-nginx-helper-admin.php | Updated option names, constant names, menu titles, text domains, feed URLs, and cache timestamp message |
| admin/partials/nginx-helper-admin-display.php | Updated page title and removed Support tab, renamed Cloudflare options file reference |
| admin/partials/nginx-helper-sidebar-display.php | Updated external links from rtCamp to EasyEngine |
| admin/partials/easyengine-cache-manager-cloudflare-options.php | Updated all form field names and option names for Cloudflare settings |
| admin/partials/nginx-helper-support-options.php | Removed entire support options file |
| admin/css/nginx-helper-admin.css | Updated icon reference and added background-size property |
| admin/icons/icon-64x64.png | Added new 64x64 icon for rebranded plugin |
| composer.json | Updated keyword from "easycache" to "easyengine cache helper" |
| readme.txt | Updated plugin name, description, screenshot captions, and removed trailing whitespace |
| README.md | Updated plugin name, description, added Cloudflare FAQ section, and screenshot references |
| wpassets/icon-256x256.png | Added new WordPress.org plugin directory icon |
| wpassets/icon-128x128.png | Added new WordPress.org plugin directory icon |
Critical Issues Found:
- Backward Compatibility: Option names and constant names have been changed without migration logic, which will cause existing users to lose their Cloudflare settings upon upgrade. Migration code should be added to preserve user configurations.
Comments suppressed due to low confidence (1)
admin/partials/easyengine-cache-manager-cloudflare-options.php:41
- The option name has been changed from 'easycache_cf_settings' to 'easyengine_cache_manager_cf_settings' without any migration logic. This will cause existing users who have configured Cloudflare settings to lose their configuration after upgrading. You should add migration logic to copy settings from the old option name to the new one.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| <div class="wrap rt-nginx-wrapper"> | ||
| <h2 class="rt_option_title"> | ||
| <?php esc_html_e( 'Nginx Settings', 'nginx-helper' ); ?> | ||
| <?php esc_html_e( 'EasyEngine Cache Helper for Nginx & Cloudflare Settings', 'nginx-helper' ); ?> |
Copilot
AI
Dec 17, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The title "EasyEngine Cache Helper for Nginx & Cloudflare Settings" is quite long for a settings page heading. Consider using a shorter version like "Cache Helper Settings" since users already know they're in the EasyEngine Cache Helper plugin.
| background: url(../icons/nginx-icon-32x32.png) 0 6px no-repeat rgba(0, 0, 0, 0); | ||
| background: url(../icons/icon-64x64.png) 0 6px no-repeat rgba(0, 0, 0, 0); | ||
| padding-left: 40px; | ||
| background-size: 36px 36px; |
Copilot
AI
Dec 17, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Consider using a CSS pixel ratio media query to serve different icon sizes for high-DPI displays, or use an SVG icon for better scalability across all display densities.
| $default_settings = $this->get_cloudflare_default_settings(); | ||
|
|
||
| $stored_options = get_site_option( 'easycache_cf_settings', array() ); | ||
| $stored_options = get_site_option( 'easyengine_cache_manager_cf_settings', array() ); |
Copilot
AI
Dec 17, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The option name has been changed from 'easycache_cf_settings' to 'easyengine_cache_manager_cf_settings' without any migration logic. This will cause existing users who have configured Cloudflare settings to lose their configuration after upgrading. You should add migration logic to copy settings from the old option name to the new one. Consider adding this in the handle_nginx_helper_upgrade method or in the activator.
| if ( defined( 'EASYENGINE_CACHE_MANAGER_CLOUDFLARE_API_TOKEN' ) && !empty( EASYENGINE_CACHE_MANAGER_CLOUDFLARE_API_TOKEN ) ) { | ||
| $stored_options['api_token'] = EASYENGINE_CACHE_MANAGER_CLOUDFLARE_API_TOKEN; |
Copilot
AI
Dec 17, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The constant name has been changed from 'EASYCACHE_CLOUDFLARE_API_TOKEN' to 'EASYENGINE_CACHE_MANAGER_CLOUDFLARE_API_TOKEN'. This is a breaking change for users who have defined this constant in their wp-config.php. Consider supporting both the old and new constant names for backward compatibility, or document this breaking change clearly in upgrade notes.
| "cloudflare-edge-cache", | ||
| "cache-tags", | ||
| "easycache" | ||
| "easyengine cache helper" |
Copilot
AI
Dec 17, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The keyword "easyengine cache helper" contains a space, which may not be ideal for composer keywords. Consider using "easyengine-cache-helper" or "easyengine_cache_helper" instead, similar to the other keywords in the list which use hyphens.
| 'kind' => 'zone', | ||
| 'phase' => 'http_request_cache_settings', | ||
| 'description' => 'Set\'s the edge cache rules by Nginx-Helper Cache Manager.', | ||
| 'description' => 'Set\'s the edge cache rules by EasyEngine Cache Helper.', |
Copilot
AI
Dec 17, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The description mentions "Nginx-Helper Cache Helper" which is inconsistent. It should be "EasyEngine Cache Helper" to match the plugin's new name as stated in line 208.
| array( | ||
| 'general' => array( | ||
| 'menu_title' => __( 'General', 'nginx-helper' ), | ||
| 'menu_title' => __( 'Nginx', 'nginx-helper' ), |
Copilot
AI
Dec 17, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The tab menu title was changed from "General" to "Nginx". While this is more specific, consider that the tab contains general Nginx cache settings, not just Nginx-specific features. The name "General" might be clearer if the plugin handles both Nginx and Cloudflare settings, as "Nginx" might be confused with the separate Cloudflare tab.
| $stored_options = get_site_option( 'easyengine_cache_manager_cf_settings', array() ); | ||
|
|
||
| $diff_options = wp_parse_args( $stored_options, $default_settings ); | ||
|
|
||
| add_site_option( 'easycache_cf_settings', $diff_options ); | ||
| add_site_option( 'easyengine_cache_manager_cf_settings', $diff_options ); |
Copilot
AI
Dec 17, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The option name has been changed from 'easycache_cf_settings' to 'easyengine_cache_manager_cf_settings' without any migration logic. This will cause existing users who have configured Cloudflare settings to lose their configuration after upgrading. You should add migration logic to copy settings from the old option name to the new one.
| } else { | ||
| // Page is for an anonymous user and is cacheable. | ||
| $options = get_option( 'easycache_cf_settings' ); | ||
| $options = get_option( 'easyengine_cache_manager_cf_settings' ); |
Copilot
AI
Dec 17, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The option name has been changed from 'easycache_cf_settings' to 'easyengine_cache_manager_cf_settings' without any migration logic. This will cause existing users who have configured Cloudflare settings to lose their configuration after upgrading. You should add migration logic to copy settings from the old option name to the new one.
|
|
||
| if ( defined( 'EASYCACHE_CLOUDFLARE_API_TOKEN' ) && !empty( EASYCACHE_CLOUDFLARE_API_TOKEN ) ) { | ||
| $stored_options['api_token'] = EASYCACHE_CLOUDFLARE_API_TOKEN; | ||
| if ( defined( 'EASYENGINE_CACHE_MANAGER_CLOUDFLARE_API_TOKEN' ) && !empty( EASYENGINE_CACHE_MANAGER_CLOUDFLARE_API_TOKEN ) ) { |
Copilot
AI
Dec 17, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing space after the ! operator. Should be "! empty" instead of "!empty" according to WordPress coding standards.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
Copilot reviewed 16 out of 22 changed files in this pull request and generated 2 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| 'Cached using EasyEngine Cache Helper for Nginx & Cloudflare on ' . current_time( 'mysql' ) . '. ' . | ||
| 'It took ' . get_num_queries() . ' queries executed in ' . timer_stop() . ' seconds.' . | ||
| "-->\n" . | ||
| '<!--Visit http://wordpress.org/extend/plugins/nginx-helper/faq/ for more details-->'; |
Copilot
AI
Dec 17, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The URL in the HTML comment uses the old WordPress plugin directory path 'http://wordpress.org/extend/plugins/nginx-helper/faq/' which may be outdated. The current WordPress plugin directory structure typically uses 'https://wordpress.org/plugins/nginx-helper/' (note the https and lack of 'extend' in the path). Consider updating this URL to match the current WordPress plugin directory structure.
|
|
||
| if ( defined( 'EASYCACHE_CLOUDFLARE_API_TOKEN' ) && !empty( EASYCACHE_CLOUDFLARE_API_TOKEN ) ) { | ||
| $stored_options['api_token'] = EASYCACHE_CLOUDFLARE_API_TOKEN; | ||
| if ( defined( 'EASYENGINE_CACHE_MANAGER_CLOUDFLARE_API_TOKEN' ) && !empty( EASYENGINE_CACHE_MANAGER_CLOUDFLARE_API_TOKEN ) ) { |
Copilot
AI
Dec 17, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing space before the negation operator. The code uses '!empty' but WordPress coding standards require a space before the negation operator: '! empty'. This should be consistent with the spacing used elsewhere in the file (e.g., line 370 where '! empty' is correctly spaced).
Changes Made