Benchmarks
Plugin footprint 83% from 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed successfully, without throwing any errors or notices
Server metrics [RAM: ▲0.35MB] [CPU: ▼4.79ms] Passed 4 tests
A check of server-side resources used by Demo Content Templates
No issues were detected with server-side resource usage
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.83 ▲0.37 | 40.43 ▲3.09 |
Dashboard /wp-admin | 3.67 ▲0.32 | 46.95 ▼13.00 |
Posts /wp-admin/edit.php | 3.72 ▲0.36 | 44.28 ▼2.83 |
Add New Post /wp-admin/post-new.php | 6.25 ▲0.36 | 92.32 ▼2.89 |
Media Library /wp-admin/upload.php | 3.59 ▲0.36 | 35.71 ▼0.44 |
Demo Template Settings /wp-admin/tools.php?page=dct_admin | 3.52 | 33.84 |
Add New /wp-admin/post-new.php?post_type=dct_template | 3.75 | 58.27 |
Demo Templates /wp-admin/edit.php?post_type=dct_template | 3.64 | 38.34 |
Server storage [IO: ▲0.60MB] [DB: ▲0.00MB] Passed 3 tests
A short overview of filesystem and database impact
There were no storage issued detected upon installing this plugin
Filesystem: 64 new files
Database: no new tables, 6 new options
New WordPress options |
---|
widget_recent-comments |
widget_theysaidso_widget |
theysaidso_admin_options |
widget_recent-posts |
db_upgraded |
can_compress_scripts |
Browser metrics Passed 4 tests
Checking browser requirements for Demo Content Templates
Minimal impact on browser resources
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,823 ▲62 | 14.71 ▲0.33 | 1.76 ▲0.16 | 49.82 ▲8.01 |
Dashboard /wp-admin | 2,220 ▲46 | 5.55 ▼0.02 | 85.37 ▼1.98 | 39.38 ▲2.52 |
Posts /wp-admin/edit.php | 2,131 ▲34 | 2.02 ▼0.01 | 33.05 ▼4.63 | 35.05 ▲1.11 |
Add New Post /wp-admin/post-new.php | 1,563 ▲35 | 18.27 ▼4.78 | 596.68 ▼46.18 | 65.61 ▲13.75 |
Media Library /wp-admin/upload.php | 1,434 ▲31 | 4.20 ▲0.03 | 104.24 ▲5.60 | 44.32 ▼2.91 |
Demo Template Settings /wp-admin/tools.php?page=dct_admin | 900 | 2.03 | 22.89 | 36.22 |
Add New /wp-admin/post-new.php?post_type=dct_template | 2,820 | 7.77 | 174.08 | 69.55 |
Demo Templates /wp-admin/edit.php?post_type=dct_template | 1,146 | 1.97 | 29.99 | 29.94 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 75% from 4 tests
🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
These items require your attention
- Zombie WordPress options were found after uninstall: 6 options
- widget_theysaidso_widget
- db_upgraded
- widget_recent-comments
- widget_recent-posts
- can_compress_scripts
- theysaidso_admin_options
Smoke tests 50% from 4 tests
Server-side errors Passed 1 test
🔹 Test weight: 20 | This is a shallow check for server-side errors
The smoke test was a success, however most plugin functionality was not tested
SRP 0% from 2 tests
🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please take a closer look at the following
- 2× PHP files output text when accessed directly:
- > /wp-content/plugins/demo-content-templates/src/View/templates/dct_template_dropdown.php
- > /wp-content/plugins/demo-content-templates/src/View/templates/dct_metabox.php
- 18× PHP files trigger server errors when accessed directly (only 10 are shown):
- > PHP Notice
Undefined variable: page_template_options in wp-content/plugins/demo-content-templates/src/View/templates/dct_template_dropdown.php on line 3
- > PHP Warning
Invalid argument supplied for foreach() in wp-content/plugins/demo-content-templates/src/View/templates/dct_metabox.php on line 2
- > PHP Fatal error
Uncaught Error: Class 'WP_UnitTestCase' not found in wp-content/plugins/demo-content-templates/tests/Infrastructure/test-WP_Page_Duplicator.php:12
- > PHP Notice
Undefined variable: key in wp-content/plugins/demo-content-templates/tests/test-data/templates/test-template.php on line 2
- > PHP Fatal error
Uncaught Error: Class 'WP_UnitTestCase' not found in wp-content/plugins/demo-content-templates/tests/Domain/ValueObjects/test-Labels.php:5
- > PHP Fatal error
Uncaught Error: Call to undefined function PMac\\DemoContentTemplates\\plugin_dir_path() in wp-content/plugins/demo-content-templates/demo-content-templates.php:33
- > PHP Fatal error
Uncaught Error: Class 'Walker_Page' not found in wp-content/plugins/demo-content-templates/src/Infrastructure/Walker_Page_Checkbox.php:10
- > PHP Fatal error
Uncaught Error: Class 'WP_UnitTestCase' not found in wp-content/plugins/demo-content-templates/tests/Domain/ValueObjects/test-AdminSubMenu.php:10
- > PHP Fatal error
Uncaught Error: Class 'Assert\\InvalidArgumentException' not found in wp-content/plugins/demo-content-templates/vendor/beberlei/assert/lib/Assert/LazyAssertionException.php:17
- > PHP Fatal error
Uncaught Error: Class 'WP_UnitTestCase' not found in wp-content/plugins/demo-content-templates/tests/Infrastructure/test-WP_Template_Locator.php:7
- > PHP Notice
User-side errors Passed 1 test
🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser errors were detected
Optimizations
Plugin configuration Passed 29 tests
readme.txt Passed 16 tests
The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
3 plugin tags: theme content, demo content, page template
demo-content-templates/demo-content-templates.php Passed 13 tests
The main PHP script in "Demo Content Templates" version 1.0 is automatically included on every request by WordPress
38 characters long description:
Store demo page content for later use.
Code Analysis Passed 3 tests
File types Passed 1 test
🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
There were no executable files found in this plugin3,444 lines of code in 58 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 49 | 780 | 2,373 | 3,112 |
JSON | 3 | 0 | 0 | 126 |
Bourne Shell | 1 | 21 | 11 | 120 |
CSS | 2 | 9 | 10 | 39 |
XML | 2 | 4 | 2 | 31 |
Markdown | 1 | 5 | 0 | 16 |
PHP code Passed 2 tests
This is a short overview of cyclomatic complexity and code structure for this plugin
No complexity issues detected
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.36 |
Average class complexity | 11.46 |
▷ Minimum class complexity | 1.00 |
▷ Maximum class complexity | 197.00 |
Average method complexity | 2.58 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 27.00 |
Code structure | ||
---|---|---|
Namespaces | 8 | |
Interfaces | 1 | |
Traits | 0 | |
Classes | 36 | |
▷ Abstract classes | 1 | 2.78% |
▷ Concrete classes | 35 | 97.22% |
▷ Final classes | 0 | 0.00% |
Methods | 251 | |
▷ Static methods | 96 | 38.25% |
▷ Public methods | 234 | 93.23% |
▷ Protected methods | 13 | 5.18% |
▷ Private methods | 4 | 1.59% |
Functions | 17 | |
▷ Named functions | 13 | 76.47% |
▷ Anonymous functions | 4 | 23.53% |
Constants | 72 | |
▷ Global constants | 0 | 0.00% |
▷ Class constants | 72 | 100.00% |
▷ Public constants | 72 | 100.00% |
Plugin size Passed 2 tests
Image compression Passed 2 tests
It is recommended to compress PNG files in your plugin to minimize bandwidth usage
There were not PNG files found in your plugin