-
Notifications
You must be signed in to change notification settings - Fork 135
Open
Labels
InfrastructureIssues for the overall performance plugin infrastructureIssues for the overall performance plugin infrastructure[Type] EnhancementA suggestion for improvement of an existing featureA suggestion for improvement of an existing feature
Description
The current code coverage metrics are as follows :
and can be improved by addressing the following issues:
-
Ignore Coverage for Non-Critical Code Blocks:
-
Certain ubiquitous code blocks, such as:
if ( ! defined( 'ABSPATH' ) ) { exit; }
These blocks can be excluded from code coverage by adding
// @codeCoverageIgnoreStart
and// @codeCoverageIgnoreEnd
annotations.
-
-
Exclude Plugin Bootstrap Files from Coverage:
- Files like plugin bootstrap files only include logic that is already tested elsewhere.
- Evaluate marking
uninstall.php
as indirectly tested and decide whether similar exclusions are needed for files likehooks.php
.
-
Add Missing
@covers
Annotations:- Ensure all tests have proper
@covers
annotations to map them to the code they validate. For instance:\Test_OD_URL_Metric::test_constructor
is missing a@covers ::get_uuid
annotation.
- Ensure all tests have proper
-
Add Missing Tests:
- Identify areas of the codebase that are not currently tested and write additional tests to improve overall coverage.
These changes aim to focus coverage metrics on critical functionality and ensure more accurate and meaningful reports, improving code quality and maintainability.
cc : @westonruter
westonruter and swissspidy
Metadata
Metadata
Assignees
Labels
InfrastructureIssues for the overall performance plugin infrastructureIssues for the overall performance plugin infrastructure[Type] EnhancementA suggestion for improvement of an existing featureA suggestion for improvement of an existing feature
Type
Projects
Status
In Progress 🚧