Skip to content

Commit 3f5720f

Browse files
authored
Bug fixes
1 parent a8f282f commit 3f5720f

3 files changed

Lines changed: 10 additions & 6 deletions

File tree

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1818

1919
- Added `uninstall.php` to properly clean up plugin options from the database when the plugin is deleted
2020
- Added section headers ("Performance Optimizations", "Header Cleanup", "Additional Features") to the settings page for better UX
21+
22+
### Code Quality
23+
2124
- Added `phpcompatibility/phpcompatibility-wp` to `composer.json` `require-dev` (required by `phpcs.xml` ruleset)
2225
- Added `scripts` section to `composer.json` with `lint:php` and `analyze` commands for CI integration
2326

enginescript-site-optimizer.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -71,10 +71,10 @@ function es_optimizer_init_plugin(): void {
7171

7272
// Initialize admin functionality.
7373
es_optimizer_init_admin();
74-
74+
7575
// Initialize frontend optimizations.
7676
es_optimizer_init_frontend_optimizations();
77-
77+
7878
// Initialize plugin settings link.
7979
es_optimizer_init_plugin_links();
8080
}
@@ -90,7 +90,7 @@ function es_optimizer_activate_plugin(): void {
9090
if ( false === get_option( 'es_optimizer_options' ) ) {
9191
add_option( 'es_optimizer_options', es_optimizer_get_default_options() );
9292
}
93-
93+
9494
// Clear any cached data.
9595
es_optimizer_clear_options_cache();
9696
}
@@ -104,7 +104,7 @@ function es_optimizer_activate_plugin(): void {
104104
function es_optimizer_deactivate_plugin(): void {
105105
// Clear any cached data on deactivation.
106106
es_optimizer_clear_options_cache();
107-
107+
108108
// Note: We don't delete options on deactivation to preserve user settings.
109109
// Options are only deleted on plugin uninstall.
110110
}
@@ -612,14 +612,14 @@ function es_optimizer_show_rejection_notice( array $rejected_domains, string $co
612612
}
613613

614614
if ( 'preconnect' === $context ) {
615-
$message = sprintf(
615+
$message = sprintf(
616616
// translators: %s is the list of rejected domain names.
617617
esc_html__( 'Some preconnect domains were rejected for security reasons: %s', 'enginescript-site-optimizer' ),
618618
$rejected_message
619619
);
620620
$error_code = 'preconnect_security';
621621
} else {
622-
$message = sprintf(
622+
$message = sprintf(
623623
// translators: %s is the list of rejected domain names.
624624
esc_html__( 'Some DNS prefetch domains were rejected for security reasons: %s', 'enginescript-site-optimizer' ),
625625
$rejected_message

readme.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@ No, the plugin has a simple interface where you can toggle features on and off.
5858
* **MODERNIZATION**: Replaced `isset()` ternaries with null coalescing operator
5959
* **CODE QUALITY**: Standardized all option-checking to use `empty()` with early-return pattern
6060
* **CODE QUALITY**: Consolidated duplicate domain validation functions into shared helpers
61+
* **CODE QUALITY**: Fixed trailing whitespace on blank lines and equals-sign alignment flagged by PHPCS
6162
* **CODE QUALITY**: Removed unnecessary static caching in preconnect and DNS prefetch output functions
6263
* **CODE QUALITY**: Replaced deprecated HTML `valign` attribute in settings form
6364
* **CI**: Updated Node.js from EOL version 16 to LTS version 20

0 commit comments

Comments
 (0)