How wordpress/performance works
• Performance Lab Monorepo Container
– This is the primary “root” of the architecture that encompasses every other component. It contains shared configuration files (e.g., .editorconfig, package.json, composer.json), CI configurations in the .github directory, and build-related tools (webpack, phpunit, phpcs, and phpstan).
• Plugins Directory
– Inside each plugin’s folder, there is a further separation between core code, hooks, includes, tests, and configuration files (e.g., phpcs.xml.dist). These details can be abstracted to show that each plugin’s code is self-contained and has its own testing and CI hooks.
• Bin and Tools Directories
– The “bin” folder contains command-line tools (such as plugin CLI commands and scripts for generating pending release diffs).
– The “tools” folder includes scripts and configurations for code quality (phpcs, phpstan, webpack, phpunit bootstrap, etc.).
• CI/CD and Integration Layer
– GitHub workflows found under the .github/workflows directory illustrate continuous integration (linting, testing, code analysis, deployment, etc.).
Relationships and Interactions
• Internal Integration among Plugins
• Communication with the CI/CD Pipeline
• Developer Tools and Testing
– Include directional flows from the “tools” directory (e.g., phpcs, phpstan, webpack) to indicate how they are used to build, lint, and test the codebase. Similarly, represent the “tests” subdirectories within each plugin showing that each module is thoroughly covered by its own test suite.
Architectural Patterns and Design Principles
• Monorepo Module Strategy
– Emphasize the design choice of using a monorepo to manage multiple plugins in one repository. This means that while each plugin is modular, they share common development workflows.
• Separation of Concerns
• Use of Standard Tooling and Configuration