79% knowledge-center

Code Review | Easy Accordion FAQ and Knowledge Base Software for WordPress

WordPress plugin Easy Accordion FAQ and Knowledge Base Software for WordPress scored79%from 54 tests.

About plugin

  • Plugin page: knowledge-center
  • Plugin version: 2.8
  • PHP version: 7.4.16
  • WordPress compatibility: 4.5-6.2
  • WordPress version: 6.3.1
  • First release: Oct 30, 2015
  • Latest release: Jun 29, 2023
  • Number of updates: 63
  • Update frequency: every 44.4 days
  • Top authors: emarket-design (100%)

Code review

54 tests

User reviews

5 reviews

Install metrics

10+ active /7,626 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲2.45MB] [CPU: ▲15.49ms] Passed 4 tests

An overview of server-side resources used by Easy Accordion FAQ and Knowledge Base Software for WordPress
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /5.69 ▲2.2250.47 ▲7.59
Dashboard /wp-admin5.83 ▲2.5363.32 ▲15.23
Posts /wp-admin/edit.php5.89 ▲2.5370.28 ▲27.44
Add New Post /wp-admin/post-new.php8.44 ▲2.55110.73 ▲12.19
Media Library /wp-admin/upload.php5.75 ▲2.5261.64 ▲26.93
CSV Import/Export /wp-admin/admin.php?page=operations_emd_panel5.7249.99
Getting Started /wp-admin/admin.php?page=knowledge_center5.7348.31
Plugins /wp-admin/admin.php?page=knowledge_center_store5.7650.13
Glossary /wp-admin/admin.php?page=knowledge_center_glossary5.7252.12
Add New /wp-admin/post-new.php?post_type=emd_panel5.9269.85
Support /wp-admin/admin.php?page=knowledge_center_support5.7550.77
KC Panels /wp-admin/edit.php?post_type=emd_panel5.8055.94
Settings /wp-admin/admin.php?page=knowledge_center_settings5.7350.36
KC Tags /wp-admin/edit-tags.php?taxonomy=kb_tags&post_type=emd_panel5.7450.72
KC Groups /wp-admin/edit-tags.php?taxonomy=kb_group&post_type=emd_panel5.7448.74

Server storage [IO: ▲2.93MB] [DB: ▲0.01MB] Passed 3 tests

Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 241 new files
Database: no new tables, 20 new options
New WordPress options
can_compress_scripts
knowledge_center_glob_init_list
knowledge_center_cust_roles
widget_recent-comments
widget_recent-posts
widget_knowledge_center_featured_panels_widget
knowledge_center_shc_list
knowledge_center_activation_date
knowledge_center_tax_list
widget_knowledge_center_recent_panels_widget
...

Browser metrics Passed 4 tests

This is an overview of browser requirements for Easy Accordion FAQ and Knowledge Base Software for WordPress
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,980 ▲24513.66 ▼1.011.54 ▼0.4439.67 ▼4.52
Dashboard /wp-admin2,378 ▲1895.83 ▲0.88108.55 ▼13.5147.32 ▲1.62
Posts /wp-admin/edit.php2,266 ▲1742.15 ▲0.1241.89 ▲4.9639.30 ▲6.89
Add New Post /wp-admin/post-new.php1,739 ▲22522.42 ▲4.90588.07 ▼111.3270.45 ▲19.44
Media Library /wp-admin/upload.php1,563 ▲1784.33 ▲0.04100.51 ▼3.4346.33 ▲2.31
CSV Import/Export /wp-admin/admin.php?page=operations_emd_panel1,0221.6822.0838.95
Getting Started /wp-admin/admin.php?page=knowledge_center2,5002.0846.44117.31
Plugins /wp-admin/admin.php?page=knowledge_center_store1,2851.8527.2533.81
Glossary /wp-admin/admin.php?page=knowledge_center_glossary1,0711.8527.9236.66
Add New /wp-admin/post-new.php?post_type=emd_panel2,8648.28190.3178.67
Support /wp-admin/admin.php?page=knowledge_center_support1,2631.8524.6446.80
KC Panels /wp-admin/edit.php?post_type=emd_panel1,3342.3635.2436.81
Settings /wp-admin/admin.php?page=knowledge_center_settings1,4052.6835.9533.23
KC Tags /wp-admin/edit-tags.php?taxonomy=kb_tags&post_type=emd_panel1,4092.3227.9038.87
KC Groups /wp-admin/edit-tags.php?taxonomy=kb_group&post_type=emd_panel1,4062.3228.3237.42

Uninstaller [IO: ▲0.00MB] [DB: ▲0.01MB] 75% from 4 tests

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
Please fix the following items
  • Zombie WordPress options were found after uninstall: 19 options
    • knowledge_center_setup_pages
    • knowledge_center_version
    • widget_knowledge_center_recent_panels_widget
    • knowledge_center_has_ratings
    • widget_knowledge_center_featured_panels_widget
    • knowledge_center_cust_roles
    • widget_theysaidso_widget
    • widget_recent-comments
    • knowledge_center_add_caps
    • knowledge_center_tax_list
    • ...

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 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
The following issues need your attention
  • 6× PHP files output text when accessed directly:
    • > /wp-content/plugins/knowledge-center/layouts/shc-std-panel-footer.php
    • > /wp-content/plugins/knowledge-center/layouts/widget-recent-panels-footer.php
    • > /wp-content/plugins/knowledge-center/layouts/shc-std-panel-header.php
    • > /wp-content/plugins/knowledge-center/layouts/widget-featured-panels-footer.php
    • > /wp-content/plugins/knowledge-center/layouts/widget-recent-panels-header.php
    • > /wp-content/plugins/knowledge-center/layouts/widget-featured-panels-header.php
  • 17× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_url() in wp-content/plugins/knowledge-center/includes/admin/tabs.php:54
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/knowledge-center/layouts/single-emd-panel.php:2
    • > PHP Notice
      Undefined variable: post in wp-content/plugins/knowledge-center/layouts/widget-recent-panels-content.php on line 1
    • > PHP Notice
      Undefined variable: post in wp-content/plugins/knowledge-center/layouts/widget-featured-panels-content.php on line 1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_active_sidebar() in wp-content/plugins/knowledge-center/layouts/emd-sidebar.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'EMD_MB_Field' not found in wp-content/plugins/knowledge-center/assets/ext/emd-meta-box/inc/fields/file-input.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/knowledge-center/includes/admin/singletax/emd-singletax-functions.php:2
    • > PHP Warning
      Use of undefined constant KNOWLEDGE_CENTER_PLUGIN_URL - assumed 'KNOWLEDGE_CENTER_PLUGIN_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/knowledge-center/includes/admin/tabs.php on line 47
    • > PHP Notice
      Undefined variable: post in wp-content/plugins/knowledge-center/layouts/single-emd-panel.php on line 1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/knowledge-center/includes/admin/shortcode-list-functions.php:2

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
There were no browser issues found

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
5 plugin tags: accordion, knowledge base, faq, documentation, knowledgebase

knowledge-center/knowledge-center.php Passed 13 tests

"Easy Accordion FAQ and Knowledge Base Software for WordPress" version 2.8's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
79 characters long description:
Knowledge Center helps categorize related short content in a user-friendly way.

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
Success! There were no dangerous files found in this plugin20,525 lines of code in 168 files:
LanguageFilesBlank linesComment linesLines of code
PHP926163,07912,867
JavaScript434485523,702
SVG1002,671
CSS3280661,285

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.51
Average class complexity20.00
▷ Minimum class complexity1.00
▷ Maximum class complexity143.00
Average method complexity4.53
▷ Minimum method complexity1.00
▷ Maximum method complexity73.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes55
▷ Abstract classes00.00%
▷ Concrete classes55100.00%
▷ Final classes11.82%
Methods292
▷ Static methods19968.15%
▷ Public methods28095.89%
▷ Protected methods62.05%
▷ Private methods62.05%
Functions109
▷ Named functions10899.08%
▷ Anonymous functions10.92%
Constants15
▷ Global constants15100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
52 compressed PNG files occupy 0.38MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/img/addons/spotlight-arch-300x200.png12.70KB13.13KB0.00%
assets/img/emd_templating_system.png23.46KB24.44KB0.00%
assets/img/dashboard.png4.42KB4.51KB0.00%
assets/ext/emd-meta-box/css/select2/select2.png0.60KB0.99KB0.00%
assets/img/button_buy-now.png1.68KB1.70KB0.00%