Benchmarks
Plugin footprint 83% from 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed gracefully, with no errors
Server metrics [RAM: ▲0.09MB] [CPU: ▼6.90ms] Passed 4 tests
A check of server-side resources used by Custom Posts Parents
Server-side resource usage in normal parameters
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.56 ▲0.10 | 41.25 ▼15.93 |
Dashboard /wp-admin | 3.40 ▲0.10 | 45.17 ▼1.49 |
Posts /wp-admin/edit.php | 3.51 ▲0.16 | 47.74 ▼2.61 |
Add New Post /wp-admin/post-new.php | 5.98 ▲0.09 | 96.51 ▼7.55 |
Media Library /wp-admin/upload.php | 3.32 ▲0.09 | 39.05 ▲5.20 |
Custom Post Parents /wp-admin/options-general.php?page=custom-post-parents-admin-menu | 3.29 | 34.85 |
Server storage [IO: ▲0.62MB] [DB: ▲0.00MB] Passed 3 tests
How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 24 new files
Database: no new tables, 6 new options
New WordPress options |
---|
theysaidso_admin_options |
db_upgraded |
widget_recent-comments |
widget_theysaidso_widget |
can_compress_scripts |
widget_recent-posts |
Browser metrics Passed 4 tests
An overview of browser requirements for Custom Posts Parents
Normal browser usage
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,804 ▲69 | 14.48 ▲0.10 | 1.83 ▼0.97 | 43.83 ▼19.97 |
Dashboard /wp-admin | 2,210 ▲22 | 5.83 ▼0.07 | 103.48 ▼4.51 | 45.24 ▲1.11 |
Posts /wp-admin/edit.php | 2,096 ▲10 | 2.04 ▲0.04 | 41.00 ▲5.43 | 35.74 ▼6.48 |
Add New Post /wp-admin/post-new.php | 1,539 ▼4 | 18.47 ▼0.14 | 628.80 ▼35.37 | 84.70 ▲27.45 |
Media Library /wp-admin/upload.php | 1,386 ▼2 | 4.18 ▲0.01 | 97.23 ▼5.47 | 42.09 ▼0.25 |
Custom Post Parents /wp-admin/options-general.php?page=custom-post-parents-admin-menu | 820 | 2.21 | 26.89 | 26.44 |
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
Please fix the following items
- The uninstall procedure has failed, leaving 6 options in the database
- widget_theysaidso_widget
- can_compress_scripts
- widget_recent-posts
- theysaidso_admin_options
- db_upgraded
- widget_recent-comments
Smoke tests 50% from 4 tests
Server-side errors Passed 1 test
🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Even though no errors were found, this is by no means an exhaustive test
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
Almost there! Just fix the following items
- 1× PHP files perform the task of outputting text when accessed with GET requests:
- > /wp-content/plugins/custom-post-parents/custom-post-parents/templates/admin/admin-field-post_types.php
- 10× PHP files trigger errors when accessed directly with GET requests:
- > PHP Notice
Undefined variable: available_schemas in wp-content/plugins/custom-post-parents/templates/admin/admin-field-post_types.php on line 2
- > PHP Warning
Invalid argument supplied for foreach() in wp-content/plugins/custom-post-parents/templates/admin/admin-field-post_types.php on line 2
- > PHP Warning
Invalid argument supplied for foreach() in wp-content/plugins/custom-post-parents/custom-post-parents/templates/admin/admin-field-post_types.php on line 1
- > PHP Fatal error
Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/custom-post-parents/custom-post-parents/custom-post-parents.php:12
- > PHP Notice
Undefined variable: available_schemas in wp-content/plugins/custom-post-parents/custom-post-parents/templates/admin/admin-field-post_types.php on line 1
- > PHP Fatal error
Uncaught Error: Call to undefined function _e() in wp-content/plugins/custom-post-parents/custom-post-parents/templates/admin/admin.php:3
- > PHP Fatal error
Uncaught Error: Call to undefined function _e() in wp-content/plugins/custom-post-parents/custom-post-parents/templates/admin/admin-section-intro.php:1
- > PHP Fatal error
Uncaught Error: Call to undefined function _e() in wp-content/plugins/custom-post-parents/templates/admin/admin-section-intro.php:1
- > PHP Fatal error
Uncaught Error: Call to undefined function register_deactivation_hook() in wp-content/plugins/custom-post-parents/custom-post-parents.php:14
- > PHP Fatal error
Uncaught Error: Call to undefined function _e() in wp-content/plugins/custom-post-parents/templates/admin/admin.php:2
- > PHP Notice
User-side errors Passed 1 test
🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser issues were found
Optimizations
Plugin configuration Passed 29 tests
readme.txt Passed 16 tests
Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
3 plugin tags: post type, hierarchy, parent
custom-post-parents/custom-post-parents.php Passed 13 tests
The principal PHP file in "Custom Posts Parents" v. 0.1 is loaded by WordPress automatically on each request
41 characters long description:
Allow to set any post type as post parent
Code Analysis Passed 3 tests
File types Passed 1 test
🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
No dangerous file extensions were detected6,021 lines of code in 20 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PO File | 1 | 2,293 | 3,225 | 5,106 |
PHP | 16 | 147 | 90 | 764 |
JavaScript | 2 | 9 | 1 | 134 |
Markdown | 1 | 16 | 0 | 17 |
PHP code Passed 2 tests
An overview of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.38 |
Average class complexity | 12.38 |
▷ Minimum class complexity | 6.00 |
▷ Maximum class complexity | 28.00 |
Average method complexity | 2.91 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 15.00 |
Code structure | ||
---|---|---|
Namespaces | 0 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 8 | |
▷ Abstract classes | 0 | 0.00% |
▷ Concrete classes | 8 | 100.00% |
▷ Final classes | 0 | 0.00% |
Methods | 51 | |
▷ Static methods | 8 | 15.69% |
▷ Public methods | 45 | 88.24% |
▷ Protected methods | 0 | 0.00% |
▷ Private methods | 6 | 11.76% |
Functions | 7 | |
▷ Named functions | 1 | 14.29% |
▷ Anonymous functions | 6 | 85.71% |
Constants | 6 | |
▷ Global constants | 4 | 66.67% |
▷ Class constants | 2 | 33.33% |
▷ Public constants | 2 | 100.00% |
Plugin size Passed 2 tests
Image compression Passed 2 tests
All PNG images should be compressed to minimize bandwidth usage for end users
No PNG files were detected