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
The plugin installed successfully, without throwing any errors or notices
Server metrics [RAM: ▲0.36MB] [CPU: ▼295.13ms] Passed 4 tests
Analyzing server-side resources used by DW Knowledge Base
This plugin has minimal impact on server resources
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.85 ▲0.34 | 60.24 ▲7.30 |
Dashboard /wp-admin | 3.79 ▲0.39 | 38.29 ▲3.46 |
Posts /wp-admin/edit.php | 4.02 ▲0.38 | 44.09 ▲3.26 |
Add New Post /wp-admin/post-new.php | 7.32 ▲0.35 | 98.63 ▼1,186.04 |
Media Library /wp-admin/upload.php | 3.74 ▲0.45 | 30.25 ▼1.18 |
Categories /wp-admin/edit-tags.php?taxonomy=dwkb_category&post_type=dwkb | 3.74 | 30.57 |
Settings /wp-admin/edit.php?post_type=dwkb&page=dwkb_options | 4.18 | 29.48 |
Tags /wp-admin/edit-tags.php?taxonomy=dwkb_tag&post_type=dwkb | 3.74 | 27.92 |
All Articles /wp-admin/edit.php?post_type=dwkb | 3.79 | 29.49 |
Add New /wp-admin/post-new.php?post_type=dwkb | 4.05 | 55.74 |
Server storage [IO: ▲2.91MB] [DB: ▲0.00MB] Passed 3 tests
How much does this plugin use your filesystem and database?
The plugin installed successfully
Filesystem: 316 new files
Database: no new tables, 1 new option
New WordPress options |
---|
dwkb_category_children |
Browser metrics Passed 4 tests
A check of browser resources used by DW Knowledge Base
This plugin has a minimal impact on browser resources
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 3,997 ▲237 | 16.26 ▲0.55 | 11.90 ▲6.17 | 2.69 ▲0.03 |
Dashboard /wp-admin | 2,944 ▲72 | 6.02 ▼0.19 | 117.13 ▼20.25 | 151.92 ▼14.01 |
Posts /wp-admin/edit.php | 2,740 ▲52 | 3.37 ▲0.13 | 65.66 ▲2.47 | 165.14 ▲20.61 |
Add New Post /wp-admin/post-new.php | 1,792 ▲40 | 16.98 ▼4.85 | 430.40 ▼20.05 | 157.85 ▼2.54 |
Media Library /wp-admin/upload.php | 1,742 ▲50 | 5.56 ▲0.03 | 142.59 ▲8.28 | 187.76 ▲1.96 |
Categories /wp-admin/edit-tags.php?taxonomy=dwkb_category&post_type=dwkb | 1,802 | 2.92 | 55.85 | 138.48 |
Settings /wp-admin/edit.php?post_type=dwkb&page=dwkb_options | 1,274 | 2.65 | 56.33 | 120.68 |
Tags /wp-admin/edit-tags.php?taxonomy=dwkb_tag&post_type=dwkb | 1,642 | 2.91 | 54.30 | 102.86 |
All Articles /wp-admin/edit.php?post_type=dwkb | 1,475 | 3.30 | 59.87 | 113.28 |
Add New /wp-admin/post-new.php?post_type=dwkb | 3,522 | 10.11 | 201.35 | 201.85 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 75% from 4 tests
🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
- This plugin did not uninstall successfully, leaving 1 option in the database
- dwkb_category_children
Smoke tests 75% from 4 tests
Server-side errors Passed 1 test
🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Good news, no errors were detected
SRP 50% from 2 tests
🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please fix the following items
- 27× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
- > PHP Fatal error
Uncaught Error: Call to undefined function get_terms() in wp-content/plugins/dw-knowledge-base/templates/front/index-dwkb-default.php:22
- > PHP Fatal error
Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/dw-knowledge-base/inc/widgets/dwkb-category.php:4
- > PHP Fatal error
Uncaught Error: Call to undefined function have_posts() in wp-content/plugins/dw-knowledge-base/templates/front/single-dwkb.php:2
- > PHP Fatal error
Uncaught Error: Call to undefined function add_action() in wp-content/plugins/dw-knowledge-base/inc/cmb2/includes/types/cmb2_post_search_field.php:23
- > PHP Warning
require_once(DWKB_DIRinc/widgets/dwkb-article.php): failed to open stream: No such file or directory in wp-content/plugins/dw-knowledge-base/inc/widgets.php on line 2
- > PHP Fatal error
Uncaught Error: Call to undefined function add_action() in wp-content/plugins/dw-knowledge-base/inc/cmb2/example-functions.php:68
- > PHP Warning
Use of undefined constant DWKB_DIR - assumed 'DWKB_DIR' (this will throw an Error in a future version of PHP) in wp-content/plugins/dw-knowledge-base/templates/admin/settings.php on line 2
- > PHP Notice
Trying to get property 'prefix' of non-object in wp-content/plugins/dw-knowledge-base/inc/cmb2-taxonomy/includes/CMB2_Taxonomy.php on line 15
- > PHP Warning
Use of undefined constant DWKB_DIR - assumed 'DWKB_DIR' (this will throw an Error in a future version of PHP) in wp-content/plugins/dw-knowledge-base/templates/admin/settings.php on line 4
- > PHP Fatal error
Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/dw-knowledge-base/inc/cmb2/bootstrap.php:12
- > PHP Fatal error
User-side errors Passed 1 test
🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There were no browser issues found
Optimizations
Plugin configuration 87% from 29 tests
readme.txt 88% from 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
These attributes need your attention:
- Screenshots: Please add images for these screenshots: #1 (DW Knowledge Base - Article List), #2 (DW Knowledge Base - Plugin Setting), #3 (DW Knowledge Base - Front-End Index), #4 (DW Knowledge Base - Single Article)
- Tags: Please delete some tags, you are using 12 tag instead of maximum 10
dw-knowledge-base/dw-knowledgebase.php 85% from 13 tests
Analyzing the main PHP file in "DW Knowledge Base" version 1.0.2
The following require your attention:
- Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("dw-knowledge-base.php" instead of "dw-knowledgebase.php")
- Text Domain: The text domain is optional since WordPress version 4.6; if you do specify it, it must be the same as the plugin slug
Code Analysis Passed 3 tests
File types Passed 1 test
🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
There were no executable files found in this plugin38,902 lines of code in 163 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PO File | 119 | 12,731 | 16,329 | 29,151 |
PHP | 32 | 1,190 | 2,324 | 4,718 |
CSS | 5 | 1,039 | 1,023 | 3,970 |
JavaScript | 4 | 165 | 116 | 698 |
Markdown | 3 | 131 | 0 | 365 |
PHP code Passed 2 tests
This is a very shot review of cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.45 |
Average class complexity | 33.11 |
▷ Minimum class complexity | 1.00 |
▷ Maximum class complexity | 121.00 |
Average method complexity | 3.63 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 17.00 |
Code structure | ||
---|---|---|
Namespaces | 0 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 18 | |
▷ Abstract classes | 0 | 0.00% |
▷ Concrete classes | 18 | 100.00% |
▷ Final classes | 0 | 0.00% |
Methods | 220 | |
▷ Static methods | 20 | 9.09% |
▷ Public methods | 209 | 95.00% |
▷ Protected methods | 8 | 3.64% |
▷ Private methods | 3 | 1.36% |
Functions | 66 | |
▷ Named functions | 66 | 100.00% |
▷ Anonymous functions | 0 | 0.00% |
Constants | 25 | |
▷ Global constants | 23 | 92.00% |
▷ Class constants | 2 | 8.00% |
▷ Public constants | 2 | 100.00% |
Plugin size 50% from 2 tests
Image compression 50% from 2 tests
All PNG images should be compressed to minimize bandwidth usage for end users
21 PNG files occupy 0.59MB with 0.22MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
inc/cmb2/includes/types/post-search-dialog.png | 74.57KB | 23.25KB | ▼ 68.82% |
inc/cmb2/images/ui-bg_flat_0_aaaaaa_40x100.png | 0.18KB | 0.08KB | ▼ 51.67% |
inc/cmb2/images/ui-bg_glass_75_dadada_1x400.png | 0.11KB | 0.16KB | 0.00% |
screenshot-1.png | 110.60KB | 35.70KB | ▼ 67.72% |
inc/cmb2/images/ico-delete.png | 0.70KB | 0.72KB | 0.00% |