78% bsf-docs

Code Review | BSF Docs

WordPress plugin BSF Docs scored 78% from 54 tests.

About plugin

  • Plugin page: bsf-docs
  • Plugin version: 1.0.6
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-6.3
  • WordPress version: 6.3.1
  • First release: Sep 20, 2017
  • Latest release: Aug 24, 2023
  • Number of updates: 18
  • Update frequency: every 120.8 days
  • Top authors: brainstormworg (66.67%)Nikschavan (38.89%)

Code review

54 tests

User reviews

5 reviews

Install metrics

100+ active / 5,900 total downloads


Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.12MB] [CPU: ▼1.50ms] Passed 4 tests

This is a short check of server-side resources used by BSF Docs
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.58 ▲0.1238.84 ▼2.09
Dashboard /wp-admin3.40 ▲0.0949.99 ▲1.96
Posts /wp-admin/edit.php3.52 ▲0.1648.99 ▲3.75
Add New Post /wp-admin/post-new.php6.14 ▲0.2589.04 ▼8.93
Media Library /wp-admin/upload.php3.32 ▲0.0939.45 ▲3.06
Add Doc /wp-admin/post-new.php?post_type=docs6.1486.62
Settings /wp-admin/edit.php?post_type=docs&page=bsf_docs_settings3.3533.42
Docs /wp-admin/edit.php?post_type=docs3.3740.22
Categories /wp-admin/edit-tags.php?taxonomy=docs_category&post_type=docs3.3135.10
Tags /wp-admin/edit-tags.php?taxonomy=docs_tag&post_type=docs3.3135.42

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

A short overview of filesystem and database impact
There were no storage issued detected upon installing this plugin
Filesystem: 20 new files
Database: no new tables, 8 new options
New WordPress options

Browser metrics Passed 4 tests

Checking browser requirements for BSF Docs
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,867 ▲13213.25 ▼1.141.86 ▲0.2740.01 ▼1.27
Dashboard /wp-admin2,248 ▲605.88 ▲0.00112.05 ▲10.3944.24 ▲2.78
Posts /wp-admin/edit.php2,125 ▲362.15 ▲0.1635.13 ▲1.3632.86 ▼0.75
Add New Post /wp-admin/post-new.php1,553 ▲2923.40 ▲0.26637.34 ▼29.1754.62 ▲2.35
Media Library /wp-admin/upload.php1,424 ▲364.20 ▼0.0393.54 ▼12.0842.26 ▼1.25
Add Doc /wp-admin/post-new.php?post_type=docs6,47524.95890.9831.76
Settings /wp-admin/edit.php?post_type=docs&page=bsf_docs_settings9752.0323.3133.53
Docs /wp-admin/edit.php?post_type=docs1,1401.9430.2929.54
Categories /wp-admin/edit-tags.php?taxonomy=docs_category&post_type=docs1,2982.1426.2726.08
Tags /wp-admin/edit-tags.php?taxonomy=docs_tag&post_type=docs1,2762.1325.3227.24

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
It is recommended to fix the following
  • This plugin did not uninstall successfully, leaving 8 options in the database
    • widget_recent-posts
    • widget_bsf_docs_cat_widget
    • theysaidso_admin_options
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-comments
    • can_compress_scripts
    • widget_bsf_docs_widget

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 no errors were found, this is by no means an exhaustive test

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
Please fix the following
  • 3× PHP files output text when accessed directly:
    • > /wp-content/plugins/bsf-docs/includes/bsf-options-page.php
    • > /wp-content/plugins/bsf-docs/classes/class-bsf-doc-loader.php
    • > /wp-content/plugins/bsf-docs/bsf-docs.php
  • 4× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_header() in wp-content/plugins/bsf-docs/includes/bsf-single-template.php:9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_header() in wp-content/plugins/bsf-docs/includes/taxonomy-bsf-docs-cat.php:13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_header() in wp-content/plugins/bsf-docs/includes/bsf-archive-template.php:9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_header() in wp-content/plugins/bsf-docs/includes/taxonomy-bsf-docs-tag.php:13

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side


Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
3 plugin tags: documentation, wpdocs, docs

bsf-docs/bsf-docs.php 92% from 13 tests

The main PHP script in "BSF Docs" version 1.0.6 is automatically included on every request by WordPress
Please take the time to fix the following:
  • Description: Keep the plugin description shorter than 140 characters (currently 159 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Everything looks great! No dangerous files found in this plugin1,603 lines of code in 15 files:
LanguageFilesBlank linesComment linesLines of code

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.29
Average class complexity13.25
▷ Minimum class complexity5.00
▷ Maximum class complexity28.00
Average method complexity2.36
▷ Minimum method complexity1.00
▷ Maximum method complexity8.00
Code structure
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes125.00%
▷ Static methods616.67%
▷ Public methods3288.89%
▷ Protected methods00.00%
▷ Private methods411.11%
▷ Named functions3100.00%
▷ Anonymous functions00.00%
▷ Global constants6100.00%
▷ Class constants00.00%
▷ Public constants00.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