Skip to content

Commit 30de4dd

Browse files
committed
Text review and update for minimum WordPress version from 6.6 to 6.8 across all relevant files and documentation, ensuring consistency with the plugin's stated requirements and compatibility testing.
1 parent 236e9c5 commit 30de4dd

20 files changed

Lines changed: 764 additions & 439 deletions

.gitattributes

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# Keep repository text files normalized to LF across platforms.
2+
* text=auto eol=lf
Lines changed: 71 additions & 71 deletions
Original file line numberDiff line numberDiff line change
@@ -1,71 +1,71 @@
1-
---
2-
title: WordPress VIP Coding Standards Failure - PHP ${{ env.PHP_VERSION }}
3-
labels: ['vip-standards', 'coding-standards', 'needs-review', 'php-${{ env.PHP_VERSION }}']
4-
assignees: []
5-
---
6-
7-
## WordPress VIP Coding Standards Failure
8-
9-
**PHP Version:** ${{ env.PHP_VERSION }}
10-
**Run ID:** ${{ env.RUN_ID }}
11-
**Workflow:** [View Failed Run](${{ env.WORKFLOW_URL }})
12-
13-
### Issue Description
14-
15-
The WordPress VIP coding standards check has failed during the automated workflow. This scan specifically checks for enterprise-level WordPress development standards required for WordPress VIP platform compatibility.
16-
17-
### VIP Standards Focus Areas
18-
19-
The WordPress VIP Go coding standards check for:
20-
21-
🏢 **Enterprise Platform Requirements:**
22-
- File system operation restrictions (VIP platform limitations)
23-
- Performance and caching best practices for high-traffic sites
24-
- Security vulnerabilities specific to enterprise WordPress environments
25-
- User experience guidelines for enterprise-level WordPress
26-
27-
🚀 **Performance & Caching:**
28-
- Uncached function usage patterns
29-
- Database query optimization
30-
- Remote data fetching best practices
31-
- Resource-heavy operation detection
32-
33-
🔒 **VIP-Specific Security:**
34-
- File operation security in restricted environments
35-
- Admin bar removal restrictions for VIP support users
36-
- Cookie and caching constraint validations
37-
- Restricted function usage for platform stability
38-
39-
### Important Notes
40-
41-
⚠️ **VIP Standards Context:**
42-
- Many VIP standards are specific to the WordPress VIP hosting platform
43-
- Not all VIP recommendations may apply to standard WordPress installations
44-
- Some restrictions are platform-specific (e.g., file system limitations)
45-
- This scan helps ensure compatibility with enterprise WordPress environments
46-
47-
### Next Steps
48-
49-
1. **Review the workflow logs** to identify specific VIP standard violations
50-
2. **Evaluate applicability** - determine which issues apply to your hosting environment
51-
3. **Prioritize fixes** based on your deployment target:
52-
- **High Priority:** Security and performance issues
53-
- **Medium Priority:** General code quality improvements
54-
- **Low Priority:** VIP platform-specific restrictions (if not targeting VIP)
55-
4. **Update code** to address applicable VIP standard violations
56-
5. **Re-run the workflow** to verify fixes
57-
58-
### Resources
59-
60-
- [WordPress VIP Code Quality Standards](https://docs.wpvip.com/technical-references/code-quality-and-best-practices/)
61-
- [VIP Coding Standards GitHub](https://github.com/Automattic/VIP-Coding-Standards)
62-
- [WordPress VIP Platform Documentation](https://docs.wpvip.com/)
63-
- [VIP Go File System Documentation](https://docs.wpvip.com/technical-references/vip-go-files-system/)
64-
65-
### Workflow Information
66-
67-
**Failed Workflow Run:** [View Details](${{ env.WORKFLOW_URL }})
68-
**PHP Version Tested:** ${{ env.PHP_VERSION }}
69-
**Standards Used:** WordPress-VIP-Go ruleset
70-
71-
This issue was automatically created when the WordPress VIP coding standards check failed. Please review the specific violations in the workflow logs and address them according to your project's deployment requirements.
1+
---
2+
title: WordPress VIP Coding Standards Failure - PHP ${{ env.PHP_VERSION }}
3+
labels: ['vip-standards', 'coding-standards', 'needs-review', 'php-${{ env.PHP_VERSION }}']
4+
assignees: []
5+
---
6+
7+
## WordPress VIP Coding Standards Failure
8+
9+
**PHP Version:** ${{ env.PHP_VERSION }}
10+
**Run ID:** ${{ env.RUN_ID }}
11+
**Workflow:** [View Failed Run](${{ env.WORKFLOW_URL }})
12+
13+
### Issue Description
14+
15+
The WordPress VIP coding standards check has failed during the automated workflow. This scan specifically checks for enterprise-level WordPress development standards required for WordPress VIP platform compatibility.
16+
17+
### VIP Standards Focus Areas
18+
19+
The WordPress VIP Go coding standards check for:
20+
21+
🏢 **Enterprise Platform Requirements:**
22+
- File system operation restrictions (VIP platform limitations)
23+
- Performance and caching best practices for high-traffic sites
24+
- Security vulnerabilities specific to enterprise WordPress environments
25+
- User experience guidelines for enterprise-level WordPress
26+
27+
🚀 **Performance & Caching:**
28+
- Uncached function usage patterns
29+
- Database query optimization
30+
- Remote data fetching best practices
31+
- Resource-heavy operation detection
32+
33+
🔒 **VIP-Specific Security:**
34+
- File operation security in restricted environments
35+
- Admin bar removal restrictions for VIP support users
36+
- Cookie and caching constraint validations
37+
- Restricted function usage for platform stability
38+
39+
### Important Notes
40+
41+
⚠️ **VIP Standards Context:**
42+
- Many VIP standards are specific to the WordPress VIP hosting platform
43+
- Not all VIP recommendations may apply to standard WordPress installations
44+
- Some restrictions are platform-specific (e.g., file system limitations)
45+
- This scan helps ensure compatibility with enterprise WordPress environments
46+
47+
### Next Steps
48+
49+
1. **Review the workflow logs** to identify specific VIP standard violations
50+
2. **Evaluate applicability** - determine which issues apply to your hosting environment
51+
3. **Prioritize fixes** based on your deployment target:
52+
- **High Priority:** Security and performance issues
53+
- **Medium Priority:** General code quality improvements
54+
- **Low Priority:** VIP platform-specific restrictions (if not targeting VIP)
55+
4. **Update code** to address applicable VIP standard violations
56+
5. **Re-run the workflow** to verify fixes
57+
58+
### Resources
59+
60+
- [WordPress VIP Code Quality Standards](https://docs.wpvip.com/technical-references/code-quality-and-best-practices/)
61+
- [VIP Coding Standards GitHub](https://github.com/Automattic/VIP-Coding-Standards)
62+
- [WordPress VIP Platform Documentation](https://docs.wpvip.com/)
63+
- [VIP Go File System Documentation](https://docs.wpvip.com/technical-references/vip-go-files-system/)
64+
65+
### Workflow Information
66+
67+
**Failed Workflow Run:** [View Details](${{ env.WORKFLOW_URL }})
68+
**PHP Version Tested:** ${{ env.PHP_VERSION }}
69+
**Standards Used:** WordPress-VIP-Go ruleset
70+
71+
This issue was automatically created when the WordPress VIP coding standards check failed. Please review the specific violations in the workflow logs and address them according to your project's deployment requirements.

.github/copilot-instructions.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ applyTo: '**'
77
## Project Context
88

99
- **Plugin:** EngineScript Site Exporter (WordPress site export/backup plugin)
10-
- **WordPress:** 6.6+ minimum
10+
- **WordPress:** 6.8+ minimum
1111
- **PHP:** 7.4+ minimum (use typed parameters, return types, short arrays `[]`, null coalescing `??=`)
1212
- **License:** GPL-3.0-or-later
1313
- **Text Domain:** `enginescript-site-exporter`

.github/workflows/new-pull-request.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ jobs:
2323
Thanks for contributing to EngineScript Site Exporter! 🎉
2424
2525
**Before we review:**
26-
- [ ] Have you tested your changes with WordPress 6.6+?
26+
- [ ] Have you tested your changes with WordPress 6.8+?
2727
- [ ] Are your changes compatible with PHP 7.4+?
2828
- [ ] Have you followed WordPress coding standards?
2929
- [ ] Did you update the CHANGELOG.md if needed?

.github/workflows/wp-compatibility-test.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
# - WordPress Plugin Check for WordPress.org compatibility
44
# - PHPUnit tests across PHP versions (7.4/8.0: PHPUnit 9+polyfills2; 8.1: PHPUnit 9+polyfills4; 8.2: PHPUnit 11+polyfills4; 8.3: PHPUnit 12+polyfills4)
55
# - PHP compatibility testing across multiple PHP versions (7.4, 8.0, 8.3, 8.4, 8.5)
6-
# - WordPress compatibility testing across multiple WP versions (6.6, latest, nightly)
6+
# - WordPress compatibility testing across multiple WP versions (6.8, latest, nightly)
77
# - PHPStan static analysis for WordPress-specific code quality
88
# - WordPress security vulnerability scanning using pattern analysis
99
# - PHPCS code standards validation for WordPress coding standards
@@ -588,7 +588,7 @@ jobs:
588588
strategy:
589589
matrix:
590590
php-version: ['7.4', '8.0', '8.1', '8.2', '8.3', '8.4', '8.5']
591-
wp-version: ['6.6', 'latest', 'nightly']
591+
wp-version: ['6.8', 'latest', 'nightly']
592592
fail-fast: false
593593

594594
services:
@@ -806,7 +806,7 @@ jobs:
806806
$this->assertNotEmpty($wp_version, 'WordPress version should be available');
807807
808808
// Test that we're running on a supported WordPress version
809-
$min_wp_version = '6.6';
809+
$min_wp_version = '6.8';
810810
$this->assertTrue(version_compare($wp_version, $min_wp_version, '>='),
811811
"WordPress version {$wp_version} should be >= {$min_wp_version}");
812812
}

CHANGELOG.md

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,12 @@
1010
- **SSRF Hardening**: File download functions now use `realpath()`-resolved paths for all filesystem operations (`readfile()`, `is_readable()`, `is_file()`), preventing TOCTOU and SSRF attack vectors. `sse_validate_file_output_security()` now returns the resolved path for direct use.
1111
- **CSP Compliance**: Replaced inline `onclick` JavaScript handler with external `js/admin.js` file to comply with Content Security Policy headers and prevent inline script execution risks.
1212
- **Upload Directory Validation**: Added `wp_upload_dir()` error key check alongside the existing `basedir` empty check, preventing silent failures on misconfigured hosts.
13+
- **Scheduled Cleanup Hardening**: Scheduled export deletion now deletes only the validated export directory path rather than the raw cron argument.
14+
- **Symlink Export Hardening**: WordPress file archive creation now skips symbolic links and verifies resolved paths stay within the WordPress root before adding them.
15+
- **WP-CLI Path Hardening**: Removed PATH lookup for WP-CLI and now only executes WP-CLI from explicit allowed locations.
16+
- **Download Boundary Hardening**: Final download path validation now uses normalized trailing-slash directory containment checks.
17+
- **Destructive Action Hardening**: Manual export deletion now uses POST with nonce verification instead of a GET link.
18+
- **Extension Policy Tightening**: Export download validation now allows only `.zip` files.
1319

1420
### Bug Fixes
1521

@@ -18,16 +24,16 @@
1824
- **phpcs Suppression**: Removed unnecessary `phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped` comment on a line already properly escaped with `esc_html()`.
1925
- **GEMINI.md Accuracy**: Updated WP-CLI Integration section to reflect that WP-CLI is a required dependency (returns `WP_Error` if unavailable), replacing outdated "graceful fallback" language.
2026
- **WP-CLI Language**: Updated README.md and readme.txt from "when available" to "Requires WP-CLI" to match v2.0.0 behavior.
21-
- **phpcs WP Version**: Corrected `minimum_supported_wp_version` in phpcs.xml from `6.8` to `6.5` to match the plugin header `Requires at least` value.
2227

2328
### Architecture
2429

30+
- **EngineScript Archive Format**: Updated exports to match the canonical EngineScript combined site archive: outer ZIP named `<site>_enginescript_site_export_<timestamp>.zip`, root `manifest.txt`, `database/<site>_db_<timestamp>.sql.gz`, and `files/<site>_files_<timestamp>.tar.gz`.
2531
- **File Splitting**: Split monolithic `enginescript-site-exporter.php` (~1,400 lines) into a 112-line bootstrap file plus 7 focused include files under `includes/`: `helpers.php`, `security.php`, `admin-page.php`, `export.php`, `archive.php`, `cleanup.php`, `download.php`. Each file is guarded by `ABSPATH` check.
2632
- **Plugin File Constant**: Added `SSE_PLUGIN_FILE` constant defined as `__FILE__` in bootstrap, used by `includes/admin-page.php` for `plugin_dir_url()` calls since `__FILE__` resolves to the include path, not the plugin root.
2733
- **Filter Name Constant**: Replaced hardcoded `'sse_max_file_size_for_export'` filter name string with `SSE_FILTER_MAX_FILE_SIZE` constant for discoverability.
2834
- **Shell Output Sanitization**: Added `sanitize_text_field()` to WP-CLI error output in `sse_export_database()` for defense-in-depth.
29-
- **Explicit Null Return**: Added explicit `return null;` to `sse_process_file_for_zip()` to match PHPDoc return type `true|null`.
30-
- **RuntimeException Catch**: Changed `sse_add_wordpress_files_to_zip()` to catch `RuntimeException` specifically before generic `Exception` fallback.
35+
- **Explicit Null Return**: Added explicit `return null;` to `sse_process_file_for_tar()` to match PHPDoc return type `true|null`.
36+
- **RuntimeException Catch**: Changed `sse_add_wordpress_files_to_tar()` to catch `RuntimeException` specifically before generic `Exception` fallback.
3137
- **DirectoryIterator**: Replaced `scandir()` with `DirectoryIterator` in `sse_bulk_cleanup_exports_handler()` for more efficient file iteration.
3238
- **PHPStan Level Increase**: Increased PHPStan analysis level from 5 to 6, added `includes/` directory to scan paths.
3339
- **Inline CSS Removal**: Extracted 7 inline `style` attributes from admin page and success notice into dedicated `css/admin.css` file with semantic CSS classes (`sse-section-spacing`, `sse-form-table`, `sse-warning-text`, `sse-action-button`).
@@ -42,7 +48,6 @@
4248
- **Dead Code Removal**: Removed no-op `sse_prepare_execution_environment()` function and its call from the export flow.
4349
- **Debug Code Removal**: Removed `sse_test_cron_scheduling()` debug function that created/verified/removed a test cron event on every export — no longer needed after v2.0.0 cron fixes.
4450
- **Cron Logging Reduction**: Reduced cron scheduling functions from 5+ log entries each to 2 (success/failure), keeping `DISABLE_WP_CRON` diagnostic on failure only.
45-
- **ROADMAP**: Created `ROADMAP.md` documenting prioritized bug fixes, security hardening, and improvement opportunities from second-pass code review.
4651

4752
### PHP 7.4 Modernization
4853

0 commit comments

Comments
 (0)