Skip to content

Commit 3c8804d

Browse files
committed
Refactor
1 parent 54e8f0d commit 3c8804d

49 files changed

Lines changed: 2516 additions & 1591 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/CODE_OF_CONDUCT.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,4 +54,4 @@ respond in a way that they deem appropriate to the circumstances.
5454

5555
This Code of Conduct is adapted from the [Contributor Covenant](https://www.contributor-covenant.org),
5656
version 2.1, available at
57-
[https://www.contributor-covenant.org/version/2/1/code_of_conduct.html](https://www.contributor-covenant.org/version/2/1/code_of_conduct.html).
57+
[https://www.contributor-covenant.org/version/2/1/code_of_conduct.html](https://www.contributor-covenant.org/version/2/1/code_of_conduct.html).

.github/ISSUE_TEMPLATE/compatibility-test-failure.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -19,14 +19,14 @@ The automated compatibility test for PHP {{ env.PHP_VERSION }} has failed.
1919

2020
### Next Steps
2121

22-
This issue has been automatically created because the Optimizations ACE MC plugin failed to load properly with PHP {{ env.PHP_VERSION }}. This could indicate compatibility issues that need to be addressed.
22+
This issue was automatically created because the Optimizations ACE MC plugin failed to load properly with PHP {{ env.PHP_VERSION }}. This could indicate compatibility issues that need attention.
2323

24-
#### Recommended Actions:
24+
#### Recommended Actions
2525

26-
1. Review the workflow logs for specific error messages
27-
2. Check for PHP {{ env.PHP_VERSION }} specific syntax or function compatibility issues
28-
3. Test locally with PHP {{ env.PHP_VERSION }} to reproduce the issue
29-
4. Make necessary code updates to ensure compatibility
26+
1. Review the workflow logs for specific error messages.
27+
2. Check for syntax or function compatibility issues specific to PHP {{ env.PHP_VERSION }}.
28+
3. Test with PHP {{ env.PHP_VERSION }} to reproduce the issue.
29+
4. Make the code updates needed to ensure compatibility.
3030

3131
Once fixed, please close this issue and reference it in the changelog.
3232

.github/ISSUE_TEMPLATE/phpcs-failure.md

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,20 +11,24 @@ assignees: []
1111
The PHPCS (PHP CodeSniffer) check has failed for the repository.
1212

1313
**Failure Details:**
14+
1415
- **PHP Version:** {{ env.PHP_VERSION }}
1516
- **Workflow Run:** [View Details]({{ env.WORKFLOW_URL }})
1617
- **Run ID:** {{ env.RUN_ID }}
1718

1819
**What happened:**
20+
1921
The code does not meet WordPress coding standards as defined by PHPCS.
2022

2123
**What needs to be done:**
22-
1. Review the PHPCS output in the failed workflow run
23-
2. Fix coding standard violations in the code
24-
3. Ensure all PHP files follow WordPress coding standards
25-
4. Test locally with: `phpcs --standard=WordPress --extensions=php .`
24+
25+
1. Review the PHPCS output in the failed workflow run.
26+
2. Fix coding standard violations in the code.
27+
3. Ensure all PHP files follow WordPress coding standards.
28+
4. Test with: `phpcs --standard=WordPress --extensions=php .`
2629

2730
**Resources:**
31+
2832
- [WordPress Coding Standards](https://developer.wordpress.org/coding-standards/wordpress-coding-standards/php/)
2933
- [PHP CodeSniffer Documentation](https://github.com/squizlabs/PHP_CodeSniffer)
3034

.github/ISSUE_TEMPLATE/phpmd-failure.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,24 +11,28 @@ assignees: []
1111
The PHPMD (PHP Mess Detector) check has failed for the repository.
1212

1313
**Failure Details:**
14+
1415
- **PHP Version:** {{ env.PHP_VERSION }}
1516
- **Workflow Run:** [View Details]({{ env.WORKFLOW_URL }})
1617
- **Run ID:** {{ env.RUN_ID }}
1718

1819
**What happened:**
20+
1921
The code has quality issues detected by PHPMD analysis.
2022

2123
**What needs to be done:**
22-
1. Review the PHPMD output in the failed workflow run
24+
25+
1. Review the PHPMD output in the failed workflow run.
2326
2. Address code quality issues such as:
2427
- Complex methods that should be simplified
2528
- Unused variables or parameters
2629
- Code duplication
2730
- Naming conventions
2831
- Design issues
29-
3. Test locally with: `phpmd . text cleancode,codesize,controversial,design,naming,unusedcode`
32+
3. Test with: `phpmd . text cleancode,codesize,controversial,design,naming,unusedcode`
3033

3134
**Resources:**
35+
3236
- [PHPMD Documentation](https://phpmd.org/)
3337
- [PHPMD Rules](https://phpmd.org/rules/index.html)
3438

.github/ISSUE_TEMPLATE/phpstan-failure.md

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,11 @@ assignees: []
1313
**Date:** {{ date | date('YYYY-MM-DD') }}
1414

1515
### Description
16+
1617
The PHPStan for WordPress static analysis check has failed during the automated testing process.
1718

18-
### What happened?
19+
### What Happened
20+
1921
PHPStan for WordPress detected potential code issues during static analysis. This could indicate:
2022

2123
- Type safety issues specific to WordPress APIs
@@ -24,16 +26,18 @@ PHPStan for WordPress detected potential code issues during static analysis. Thi
2426
- Incorrect usage of WordPress functions or hooks
2527

2628
### Next Steps
27-
1. Review the workflow logs at the link above
28-
2. Check the specific PHPStan error messages
29-
3. Fix any identified code issues
30-
4. Ensure WordPress-specific type annotations are correct
31-
5. Re-run the workflow to verify fixes
29+
30+
1. Review the workflow logs at the link above.
31+
2. Check the specific PHPStan error messages.
32+
3. Fix any identified code issues.
33+
4. Ensure WordPress-specific type annotations are correct.
34+
5. Re-run the workflow to verify fixes.
3235

3336
### Additional Information
34-
- This check uses WordPress-specific PHPStan rules
35-
- The analysis helps catch WordPress-related coding issues early
36-
- Consider updating code to follow WordPress best practices
37+
38+
- This check uses WordPress-specific PHPStan rules.
39+
- The analysis helps catch WordPress-related coding issues early.
40+
- Consider updating code to follow WordPress best practices.
3741

3842
---
3943
*This issue was automatically created by the PHPStan for WordPress workflow failure.*

.github/ISSUE_TEMPLATE/plugin-check-failure.md

Lines changed: 25 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -17,44 +17,44 @@ The WordPress Plugin Check action has identified issues with the Optimizations A
1717

1818
### Next Steps
1919

20-
This issue has been automatically created because the WordPress Plugin Check found issues with the plugin that should be addressed. The check performed the following specific tests:
20+
This issue was automatically created because WordPress Plugin Check found issues with the plugin. The check performed these tests:
21+
22+
#### Categories
2123

22-
#### Categories:
2324
- **Accessibility**: Checks for accessibility compliance issues
2425
- **General**: General WordPress coding standards and best practices
2526
- **Performance**: Tests that identify performance bottlenecks
26-
- **Plugin Repo**: Requirements for WordPress.org plugin repository
27+
- **Plugin Repo**: Requirements for the WordPress.org plugin repository
2728
- **Security**: Security-focused checks to identify vulnerabilities
2829

29-
#### Specific Checks:
30+
#### Specific Checks
31+
3032
- **i18n_usage**: Proper internationalization usage
31-
- **code_obfuscation**: Detecting potentially obfuscated code
32-
- **direct_db_queries**: Identifying direct database queries that bypass WordPress APIs
33-
- **enqueued_scripts_in_footer**: Ensuring scripts are properly enqueued in the footer
34-
- **enqueued_scripts_size**: Checking for excessively large script files
35-
- **enqueued_styles_scope**: Ensuring styles are properly scoped
36-
- **file_type**: Checking for proper file types and formats
37-
- **late_escaping**: Ensuring output is properly escaped
38-
- **localhost**: Checking for references to localhost or development environments
39-
- **no_unfiltered_uploads**: Ensuring uploads are properly filtered
40-
- **performant_wp_query_params**: Checking for inefficient WP_Query parameters
41-
- **plugin_header_text_domain**: Verifying correct text domain in plugin header
42-
- **plugin_readme**: Checking the plugin readme file format
33+
- **code_obfuscation**: Potentially obfuscated code
34+
- **direct_db_queries**: Direct database queries that bypass WordPress APIs
35+
- **enqueued_scripts_in_footer**: Scripts that should be enqueued in the footer
36+
- **enqueued_scripts_size**: Excessively large script files
37+
- **enqueued_styles_scope**: Styles that need stronger scoping
38+
- **file_type**: Proper file types and formats
39+
- **late_escaping**: Output that should be escaped later
40+
- **localhost**: References to localhost or development environments
41+
- **no_unfiltered_uploads**: Uploads that should be filtered
42+
- **performant_wp_query_params**: Inefficient `WP_Query` parameters
43+
- **plugin_header_text_domain**: Correct text domain in the plugin header
44+
- **plugin_readme**: Plugin readme file format
4345
- **plugin_review_phpcs**: PHP CodeSniffer checks for WordPress standards
44-
- **plugin_updater**: Checking plugin update mechanisms
45-
- **trademarks**: Checking for potential trademark violations
46+
- **plugin_updater**: Plugin update mechanisms
47+
- **trademarks**: Potential trademark violations
4648

47-
#### Recommended Actions:
49+
#### Recommended Actions
4850

49-
1. Review the workflow logs for specific error messages and warnings
50-
2. Address each identified issue in the plugin code
51-
3. Test locally using the [WordPress Plugin Check tool](https://github.com/WordPress/plugin-check) to verify fixes
52-
4. Submit a pull request with the necessary changes
51+
1. Review the workflow logs for specific error messages and warnings.
52+
2. Address each identified issue in the plugin code.
53+
3. Test using the [WordPress Plugin Check tool](https://github.com/WordPress/plugin-check) to verify fixes.
54+
4. Submit a pull request with the necessary changes.
5355

5456
Once all issues are fixed, please close this issue and reference it in the changelog.
5557

5658
### About WordPress Plugin Check
5759

5860
The WordPress Plugin Check tool helps plugin authors create plugins that follow WordPress best practices. It checks for issues related to security, performance, and compatibility to ensure plugins work well in the WordPress ecosystem.
59-
60-
---

.github/ISSUE_TEMPLATE/psalm-failure.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,24 +11,28 @@ assignees: []
1111
The Psalm static analysis check has failed for the repository.
1212

1313
**Failure Details:**
14+
1415
- **PHP Version:** {{ env.PHP_VERSION }}
1516
- **Workflow Run:** [View Details]({{ env.WORKFLOW_URL }})
1617
- **Run ID:** {{ env.RUN_ID }}
1718

1819
**What happened:**
20+
1921
Psalm has detected potential issues in the code through static analysis.
2022

2123
**What needs to be done:**
22-
1. Review the Psalm output in the failed workflow run
24+
25+
1. Review the Psalm output in the failed workflow run.
2326
2. Address static analysis issues such as:
2427
- Type errors
2528
- Undefined variables or methods
2629
- Incorrect return types
2730
- Unused code
2831
- Potential null pointer issues
29-
3. Test locally with: `./vendor/bin/psalm`
32+
3. Test with: `./vendor/bin/psalm`
3033

3134
**Resources:**
35+
3236
- [Psalm Documentation](https://psalm.dev/)
3337
- [Psalm Error Levels](https://psalm.dev/docs/running_psalm/error_levels/)
3438

.github/ISSUE_TEMPLATE/security-failure.md

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,26 +11,30 @@ assignees: []
1111
A security vulnerability has been detected in the project dependencies.
1212

1313
**Failure Details:**
14+
1415
- **PHP Version:** {{ env.PHP_VERSION }}
1516
- **Workflow Run:** [View Details]({{ env.WORKFLOW_URL }})
1617
- **Run ID:** {{ env.RUN_ID }}
1718

1819
**What happened:**
19-
The security checker has identified known vulnerabilities in one or more of the project's dependencies.
20+
21+
The security checker identified known vulnerabilities in one or more project dependencies.
2022

2123
**What needs to be done:**
22-
1. Review the security check output in the failed workflow run
23-
2. Identify which dependencies have vulnerabilities
24-
3. Update vulnerable dependencies to secure versions
24+
25+
1. Review the security check output in the failed workflow run.
26+
2. Identify which dependencies have vulnerabilities.
27+
3. Update vulnerable dependencies to secure versions.
2528
4. If updates are not available, consider:
2629
- Finding alternative packages
2730
- Applying patches if available
2831
- Implementing workarounds
29-
5. Test the application after updates
32+
5. Test the application after updates.
3033

31-
**⚠️ Priority:** This is a security issue and should be addressed immediately.
34+
**Priority:** This is a security issue and should be addressed immediately.
3235

3336
**Resources:**
37+
3438
- [Symfony Security Checker](https://github.com/FriendsOfPHP/security-advisories)
3539
- [WordPress Security Best Practices](https://developer.wordpress.org/plugins/security/)
3640

0 commit comments

Comments
 (0)