@@ -27,7 +27,13 @@ This issue has been automatically created because the Simple WP Site Exporter pl
27273 . ** Design** : Poor object-oriented design patterns
28284 . ** Naming** : Inconsistent or unclear naming conventions
29295 . ** Unused Code** : Dead code that should be removed
30- 6 . ** Controversial** : Potentially problematic coding patterns
30+
31+ #### WordPress-Specific Configuration
32+ This project uses a WordPress-specific PHPMD configuration (` phpmd-wordpress.xml ` ) that suppresses WordPress-standard patterns:
33+ - ** Superglobals** : WordPress safely uses ` $_GET ` , ` $_POST ` with proper sanitization
34+ - ** Exit Expressions** : Required for file downloads and security redirects
35+ - ** Missing Imports** : WordPress core classes like ` WP_Error ` are auto-loaded
36+ - ** Else Expressions** : Sometimes required for WordPress security patterns
3137
3238#### Common Issues:
3339- ** Cyclomatic Complexity** : Methods with too many decision paths
@@ -53,13 +59,16 @@ This issue has been automatically created because the Simple WP Site Exporter pl
5359# Install dependencies
5460composer install
5561
56- # Run PHPMD analysis
62+ # Run PHPMD with WordPress-specific configuration (recommended)
63+ ./vendor/bin/phpmd simple-wp-site-exporter.php text phpmd-wordpress.xml
64+
65+ # Run PHPMD with standard rules (may show WordPress-specific warnings)
5766./vendor/bin/phpmd simple-wp-site-exporter.php text cleancode,codesize,design,naming,unusedcode
5867
59- # Generate HTML report
60- ./vendor/bin/phpmd simple-wp-site-exporter.php html cleancode,codesize,design,naming,unusedcode --reportfile phpmd-report.html
68+ # Generate HTML report with WordPress config
69+ ./vendor/bin/phpmd simple-wp-site-exporter.php html phpmd-wordpress.xml --reportfile phpmd-report.html
6170
62- # Check specific rules
71+ # Check specific rules with high priority
6372./vendor/bin/phpmd simple-wp-site-exporter.php text codesize --minimumpriority 1
6473```
6574
0 commit comments