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
This plugin's installer ran successfully
Server metrics [RAM: ▲0.06MB] [CPU: ▼3.19ms] Passed 4 tests
Analyzing server-side resources used by Knowledge Base CPT
This plugin has minimal impact on server resources
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.54 ▲0.08 | 43.27 ▲0.88 |
Dashboard /wp-admin | 3.36 ▲0.06 | 48.70 ▼0.48 |
Posts /wp-admin/edit.php | 3.48 ▲0.12 | 45.39 ▼2.19 |
Add New Post /wp-admin/post-new.php | 5.94 ▲0.06 | 85.78 ▼10.96 |
Media Library /wp-admin/upload.php | 3.29 ▲0.06 | 38.34 ▲5.44 |
All Articles /wp-admin/edit.php?post_type=knowledge_base | 3.33 | 36.38 |
Add New /wp-admin/post-new.php?post_type=knowledge_base | 3.50 | 53.52 |
Sections /wp-admin/edit-tags.php?taxonomy=section&post_type=knowledge_base | 3.43 | 36.37 |
Server storage [IO: ▲0.02MB] [DB: ▲0.00MB] Passed 3 tests
A short overview of filesystem and database impact
The plugin installed successfully
Filesystem: 9 new files
Database: no new tables, 8 new options
New WordPress options |
---|
widget_recent-comments |
widget_theysaidso_widget |
can_compress_scripts |
widget_recent-posts |
widget_ot_knowledge_articles_widget |
db_upgraded |
theysaidso_admin_options |
ot_knowledge_version |
Browser metrics Passed 4 tests
An overview of browser requirements for Knowledge Base CPT
This plugin renders optimally with no browser resource issues detected
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,834 ▲99 | 13.34 ▼1.04 | 1.90 ▲0.17 | 41.77 ▲1.01 |
Dashboard /wp-admin | 2,237 ▲49 | 5.81 ▼0.22 | 98.85 ▲1.68 | 38.41 ▼5.13 |
Posts /wp-admin/edit.php | 2,120 ▲31 | 2.02 ▲0.01 | 36.16 ▼1.80 | 32.63 ▼1.02 |
Add New Post /wp-admin/post-new.php | 1,540 ▲26 | 17.63 ▲0.12 | 656.74 ▲33.91 | 54.11 ▲3.46 |
Media Library /wp-admin/upload.php | 1,419 ▲31 | 4.22 ▼0.01 | 98.62 ▼5.44 | 44.05 ▲0.77 |
All Articles /wp-admin/edit.php?post_type=knowledge_base | 1,140 | 1.93 | 30.08 | 28.76 |
Add New /wp-admin/post-new.php?post_type=knowledge_base | 2,646 | 7.81 | 172.52 | 66.85 |
Sections /wp-admin/edit-tags.php?taxonomy=section&post_type=knowledge_base | 1,290 | 2.14 | 27.39 | 28.46 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 75% from 4 tests
🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
- Zombie WordPress options were found after uninstall: 8 options
- widget_recent-comments
- widget_theysaidso_widget
- db_upgraded
- widget_recent-posts
- can_compress_scripts
- ot_knowledge_version
- widget_ot_knowledge_articles_widget
- theysaidso_admin_options
Smoke tests 75% 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)
The smoke test was a success, however most plugin functionality was not tested
SRP 50% from 2 tests
🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please fix the following
- 6× PHP files trigger server-side errors or warnings when accessed directly:
- > PHP Fatal error
Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/knowledge-base-cpt/includes/register-settings.php:29
- > PHP Fatal error
Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/knowledge-base-cpt/knowledge-base-CPT.php:42
- > PHP Fatal error
Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/knowledge-base-cpt/includes/register-recent-widget.php:13
- > PHP Fatal error
Uncaught Error: Call to undefined function add_action() in wp-content/plugins/knowledge-base-cpt/includes/register-cpt.php:58
- > PHP Fatal error
Uncaught Error: Call to undefined function add_action() in wp-content/plugins/knowledge-base-cpt/includes/register-taxonomy.php:47
- > PHP Fatal error
Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/knowledge-base-cpt/includes/register-shortcode.php:98
- > PHP Fatal error
User-side errors Passed 1 test
🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test
Optimizations
Plugin configuration 93% from 29 tests
readme.txt Passed 16 tests
You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
5 plugin tags: faqs, documentation, wiki, knowledge base, custom post type
knowledge-base-cpt/knowledge-base-CPT.php 85% from 13 tests
"Knowledge Base CPT" version 1.1.1's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
You should first fix the following items:
- Text Domain: If you choose to specify the text domain, it must be the same as the plugin slug; optional since WordPress version 4.6
- Main file name: The principal plugin file should be the same as the plugin slug ("knowledge-base-cpt.php" instead of "knowledge-base-CPT.php")
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
Good job! No executable or dangerous file extensions detected393 lines of code in 7 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 6 | 93 | 142 | 299 |
PO File | 1 | 35 | 35 | 94 |
PHP code Passed 2 tests
This plugin's cyclomatic complexity and code structure detailed below
This plugin has no cyclomatic complexity issues
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.23 |
Average class complexity | 8.33 |
▷ Minimum class complexity | 2.00 |
▷ Maximum class complexity | 17.00 |
Average method complexity | 2.57 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 11.00 |
Code structure | ||
---|---|---|
Namespaces | 0 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 3 | |
▷ Abstract classes | 0 | 0.00% |
▷ Concrete classes | 3 | 100.00% |
▷ Final classes | 0 | 0.00% |
Methods | 14 | |
▷ Static methods | 1 | 7.14% |
▷ Public methods | 14 | 100.00% |
▷ Protected methods | 0 | 0.00% |
▷ Private methods | 0 | 0.00% |
Functions | 4 | |
▷ Named functions | 4 | 100.00% |
▷ Anonymous functions | 0 | 0.00% |
Constants | 0 | |
▷ Global constants | 0 | 0.00% |
▷ Class constants | 0 | 0.00% |
▷ Public constants | 0 | 0.00% |
Plugin size Passed 2 tests
Image compression Passed 2 tests
PNG files should be compressed to save space and minimize bandwidth usage
There are no PNG files in this plugin