Benchmarks
Plugin footprint 83% from 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Install script ran successfully
Server metrics [RAM: ▲0.02MB] [CPU: ▼20.28ms] Passed 4 tests
Analyzing server-side resources used by Feature Flags
No issues were detected with server-side resource usage
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.48 ▲0.02 | 41.34 ▲0.97 |
Dashboard /wp-admin | 3.32 ▲0.02 | 52.24 ▼4.53 |
Posts /wp-admin/edit.php | 3.37 ▲0.01 | 52.56 ▼2.48 |
Add New Post /wp-admin/post-new.php | 5.93 ▲0.04 | 86.96 ▼73.59 |
Media Library /wp-admin/upload.php | 3.24 ▲0.01 | 38.14 ▼0.52 |
Server storage [IO: ▲11.77MB] [DB: ▲0.00MB] Passed 3 tests
Analyzing filesystem and database footprints of this plugin
This plugin installed successfully
Filesystem: 3,188 new files
Database: no new tables, 6 new options
New WordPress options |
---|
widget_recent-comments |
can_compress_scripts |
theysaidso_admin_options |
widget_theysaidso_widget |
db_upgraded |
widget_recent-posts |
Browser metrics Passed 4 tests
An overview of browser requirements for Feature Flags
This plugin renders optimally with no browser resource issues detected
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,828 ▲42 | 14.55 ▲0.39 | 1.71 ▼0.43 | 43.93 ▼11.43 |
Dashboard /wp-admin | 2,227 ▲56 | 5.59 ▼0.13 | 98.22 ▼39.68 | 42.97 ▼15.81 |
Posts /wp-admin/edit.php | 2,134 ▲31 | 2.00 ▼0.02 | 38.44 ▼1.01 | 33.77 ▼2.72 |
Add New Post /wp-admin/post-new.php | 1,544 ▲9 | 22.89 ▲4.67 | 684.84 ▲17.66 | 59.28 ▼1.93 |
Media Library /wp-admin/upload.php | 1,434 ▲37 | 4.21 ▲0.00 | 108.70 ▲10.69 | 44.40 ▲1.98 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 75% from 4 tests
🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
- Zombie WordPress options were found after uninstall: 6 options
- widget_recent-posts
- theysaidso_admin_options
- widget_theysaidso_widget
- can_compress_scripts
- db_upgraded
- widget_recent-comments
Smoke tests 50% from 4 tests
Server-side errors Passed 1 test
🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though everything seems fine, this is not an exhaustive test
SRP 0% from 2 tests
🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please take a closer look at the following
- 2× PHP files perform the task of outputting text when accessed with GET requests:
- > /wp-content/plugins/feature-flags/vendor/nikic/php-parser/grammar/rebuildParsers.php
- > /wp-content/plugins/feature-flags/vendor/antecedent/patchwork/src/Console.php
- 1501× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
- > PHP Fatal error
Uncaught Error: Class 'Mockery\\Matcher\\MatcherAbstract' not found in wp-content/plugins/feature-flags/vendor/mockery/mockery/library/Mockery/Matcher/AndAnyOtherArgs.php:23
- > PHP Fatal error
Uncaught Error: Class 'PHP_CodeSniffer\\Tests\\Standards\\AbstractSniffUnitTest' not found in wp-content/plugins/feature-flags/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/ControlStructures/ElseIfDeclarationUnitTest.php:14
- > PHP Fatal error
Uncaught Error: Class 'Mockery\\Matcher\\MatcherAbstract' not found in wp-content/plugins/feature-flags/vendor/mockery/mockery/library/Mockery/Matcher/Ducktype.php:23
- > PHP Fatal error
Uncaught Error: Interface 'PHP_CodeSniffer\\Reports\\Report' not found in wp-content/plugins/feature-flags/vendor/squizlabs/php_codesniffer/src/Reports/Cbf.php:20
- > PHP Fatal error
Uncaught Error: Interface 'PHP_CodeSniffer\\Sniffs\\Sniff' not found in wp-content/plugins/feature-flags/vendor/squizlabs/php_codesniffer/src/Standards/PSR12/Sniffs/Properties/ConstantVisibilitySniff.php:16
- > PHP Fatal error
Uncaught Error: Interface 'SebastianBergmann\\CodeCoverage\\Exception' not found in wp-content/plugins/feature-flags/vendor/phpunit/php-code-coverage/src/Exception/WriteOperationFailedException.php:16
- > PHP Fatal error
Uncaught Error: Class 'Brain\\Monkey\\Expectation\\Exception\\Exception' not found in wp-content/plugins/feature-flags/vendor/brain/monkey/src/Expectation/Exception/NotAllowedMethod.php:20
- > PHP Fatal error
Uncaught Error: Class 'Hamcrest\\Text\\SubstringMatcher' not found in wp-content/plugins/feature-flags/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Text/StringEndsWith.php:11
- > PHP Fatal error
Uncaught Error: Class 'PHPUnit\\Framework\\Constraint\\Constraint' not found in wp-content/plugins/feature-flags/vendor/phpunit/phpunit/src/Framework/Constraint/Math/IsNan.php:17
- > PHP Fatal error
Uncaught Error: Class 'PHP_CodeSniffer\\Sniffs\\AbstractScopeSniff' not found in wp-content/plugins/feature-flags/vendor/automattic/vipwpcs/WordPressVIPMinimum/Sniffs/Classes/DeclarationCompatibilitySniff.php:18
- > PHP Fatal error
User-side errors Passed 1 test
🔹 Test weight: 20 | A shallow check that no browser errors were triggered
There were no browser issues found
Optimizations
Plugin configuration 93% from 29 tests
readme.txt Passed 16 tests
The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
4 plugin tags: flags, wp feature flags, feature flags, feature-flags
feature-flags/plugin.php 85% from 13 tests
The entry point to "Feature Flags" version 1.0.0 is a PHP file that has certain tags in its header comment area
Please make the necessary changes and fix the following:
- Main file name: Please rename the main PHP file in this plugin to the plugin slug ("feature-flags.php" instead of "plugin.php")
- Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6
Code Analysis 3% from 3 tests
File types 0% from 1 test
🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Almost there! Just fix the following issues
- Do not distribute dangerous files with your plugin
- .bat - Batch File in Windows
- ☣ wp-content/plugins/feature-flags/vendor/squizlabs/php_codesniffer/bin/phpcbf.bat
- ☣ wp-content/plugins/feature-flags/vendor/squizlabs/php_codesniffer/bin/phpcs.bat
- .bat - Batch File in Windows
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 2,087 | 38,153 | 69,104 | 166,048 |
Markdown | 87 | 3,118 | 0 | 7,185 |
Pascal | 130 | 3,231 | 7,118 | 6,576 |
XML | 186 | 417 | 754 | 6,252 |
JSON | 41 | 12 | 0 | 4,240 |
JavaScript | 64 | 764 | 874 | 2,157 |
yacc | 3 | 336 | 12 | 2,050 |
reStructuredText | 38 | 1,052 | 1,341 | 1,250 |
XSD | 4 | 6 | 0 | 1,094 |
CSS | 38 | 221 | 98 | 799 |
YAML | 8 | 51 | 4 | 209 |
Python | 1 | 70 | 155 | 42 |
Bourne Shell | 1 | 8 | 0 | 41 |
DOS Batch | 2 | 4 | 10 | 10 |
SVG | 2 | 0 | 0 | 2 |
PHP code 50% from 2 tests
This plugin's cyclomatic complexity and code structure detailed below
Please fix the following
- Cyclomatic complexity of methods has to be reduced to less than 100 (currently 478)
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.42 |
Average class complexity | 10.66 |
▷ Minimum class complexity | 1.00 |
▷ Maximum class complexity | 724.00 |
Average method complexity | 3.30 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 478.00 |
Code structure | ||
---|---|---|
Namespaces | 323 | |
Interfaces | 85 | |
Traits | 7 | |
Classes | 1,837 | |
▷ Abstract classes | 75 | 4.08% |
▷ Concrete classes | 1,762 | 95.92% |
▷ Final classes | 453 | 25.71% |
Methods | 8,234 | |
▷ Static methods | 795 | 9.66% |
▷ Public methods | 6,607 | 80.24% |
▷ Protected methods | 952 | 11.56% |
▷ Private methods | 675 | 8.20% |
Functions | 1,891 | |
▷ Named functions | 541 | 28.61% |
▷ Anonymous functions | 1,350 | 71.39% |
Constants | 779 | |
▷ Global constants | 122 | 15.66% |
▷ Class constants | 657 | 84.34% |
▷ Public constants | 608 | 92.54% |
Plugin size Passed 2 tests
Image compression Passed 2 tests
Often times overlooked, PNG files can occupy unnecessary space in your plugin
There were not PNG files found in your plugin