10% wp-knowledge-base

Code Review | WP Knowledge Base

WordPress plugin WP Knowledge Base scored10%from 54 tests.

About plugin

  • Plugin page: wp-knowledge-base
  • Plugin version: 0.4.6
  • PHP version: 7.4.16
  • WordPress compatibility: 3.6.1-5.0.3
  • WordPress version: 6.3.1
  • First release: Mar 16, 2016
  • Latest release: Jan 18, 2019
  • Number of updates: 20
  • Update frequency: every 52.4 days
  • Top authors: kmb40 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /4,944 total downloads

Benchmarks

Plugin footprint 58% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
You still need to fix the following installer errors
  • Install procedure had errors
    • > Warning in wp-includes/class-wp-hook.php+310
    call_user_func_array() expects parameter 1 to be a valid callback, function 'wpkn_install_step_setting' not found or invalid function name

Server metrics [RAM: ▲0.11MB] [CPU: ▼7.27ms] Passed 4 tests

Server-side resources used by WP Knowledge Base
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.85 ▲0.1143.99 ▼1.64
Dashboard /wp-admin4.14 ▲0.5155.37 ▼13.60
Posts /wp-admin/edit.php3.79 ▲0.1152.73 ▲0.74
Add New Post /wp-admin/post-new.php6.26 ▲0.1289.71 ▼12.98
Media Library /wp-admin/upload.php3.60 ▲0.1138.09 ▼0.86
All Guides /wp-admin/edit.php?post_type=article3.6541.69
Categories /wp-admin/edit-tags.php?taxonomy=category&post_type=article3.6042.76
Add New /wp-admin/post-new.php?post_type=article3.8055.68
Tags /wp-admin/edit-tags.php?taxonomy=post_tag&post_type=article3.6039.10

Server storage [IO: ▲0.03MB] [DB: ▲0.07MB] Passed 3 tests

Input-output and database impact of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 5 new files
Database: no new tables, 7 new options
New WordPress options
db_upgraded
widget_theysaidso_widget
widget_recent-comments
category_children
can_compress_scripts
theysaidso_admin_options
widget_recent-posts

Browser metrics Passed 4 tests

Checking browser requirements for WP Knowledge Base
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,891 ▲10514.26 ▲0.011.61 ▼0.3938.76 ▼0.24
Dashboard /wp-admin2,291 ▲1205.73 ▲0.0783.57 ▼18.0643.90 ▼2.90
Posts /wp-admin/edit.php2,141 ▲412.04 ▲0.0334.12 ▼6.1537.63 ▼2.21
Add New Post /wp-admin/post-new.php1,589 ▲6318.48 ▲0.94607.36 ▼103.6954.37 ▼3.54
Media Library /wp-admin/upload.php1,444 ▲474.22 ▼0.0395.92 ▲1.2445.68 ▲2.36
All Guides /wp-admin/edit.php?post_type=article1,1571.9434.0229.24
Categories /wp-admin/edit-tags.php?taxonomy=category&post_type=article1,4992.1728.3133.83
Add New /wp-admin/post-new.php?post_type=article2,4787.51184.9371.62
Settings /wp-admin/wp-knowledge-base.php260.440.1112.37
Tags /wp-admin/edit-tags.php?taxonomy=post_tag&post_type=article1,3602.1927.7230.25

Uninstaller [IO: ▲0.00MB] [DB: ▲0.08MB] 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 detected upon uninstall: 7 options
    • category_children
    • db_upgraded
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-comments
    • widget_recent-posts
    • theysaidso_admin_options

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though everything seems fine, this is not an exhaustive test

SRP 50% 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
  • 3× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wp-knowledge-base/wp-knowledge-base.php:24
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_header() in wp-content/plugins/wp-knowledge-base/templates/wpkb-index.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_header() in wp-content/plugins/wp-knowledge-base/single-article.php:10

User-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Please fix the following user-side errors
    • > GET request to /wp-admin/wp-knowledge-base.php
    • > Network (severe)
    wp-admin/wp-knowledge-base.php - Failed to load resource: the server responded with a status of 404 (Not Found)

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
4 plugin tags: wp knowledgebase, knowledgebase, faq, knowledge base

wp-knowledge-base/wp-knowledge-base.php 92% from 13 tests

The principal PHP file in "WP Knowledge Base" v. 0.4.6 is loaded by WordPress automatically on each request
Please make the necessary changes and fix the following:
  • Domain Path: The domain path is invalid: folder "/languages" does not exist

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
Everything looks great! No dangerous files found in this plugin498 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP315566498

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.33
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions19
▷ Named functions19100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.00%
▷ Class constants00.00%
▷ Public constants00.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
PNG images were not found in this plugin