84% bh-faq

Code Review | BH FAQ

WordPress plugin BH FAQ scored84%from 54 tests.

About plugin

  • Plugin page: bh-faq
  • Plugin version: 1.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.3-3.5.1
  • WordPress version: 6.3.1
  • First release: Dec 11, 2013
  • Latest release: Jun 29, 2015
  • Number of updates: 46
  • Update frequency: every 12.3 days
  • Top authors: masumbd (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,719 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Installer ran successfully

Server metrics [RAM: ▲0.04MB] [CPU: ▼14.51ms] Passed 4 tests

A check of server-side resources used by BH FAQ
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0545.79 ▲4.22
Dashboard /wp-admin3.35 ▲0.0048.36 ▼12.55
Posts /wp-admin/edit.php3.40 ▲0.0448.52 ▼4.82
Add New Post /wp-admin/post-new.php5.95 ▲0.0690.60 ▼43.61
Media Library /wp-admin/upload.php3.27 ▲0.0437.04 ▲2.95
BH FAQ Settings /wp-admin/options-general.php?page=bh-faq-settings3.2432.81
BH FAQ /wp-admin/edit.php?post_type=bh_faq_faq3.3233.50
Add New /wp-admin/post-new.php?post_type=bh_faq_faq3.3953.94

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 11 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_recent-comments
widget_recent-posts
widget_theysaidso_widget
db_upgraded
can_compress_scripts

Browser metrics Passed 4 tests

An overview of browser requirements for BH FAQ
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,941 ▲19514.75 ▲0.1914.22 ▲12.5543.11 ▲0.58
Dashboard /wp-admin2,242 ▲655.74 ▲0.0686.30 ▼7.7539.77 ▼0.47
Posts /wp-admin/edit.php2,152 ▲522.26 ▲0.2541.77 ▲2.9235.81 ▲1.44
Add New Post /wp-admin/post-new.php1,566 ▲3123.27 ▲5.41692.77 ▲43.9537.45 ▼24.89
Media Library /wp-admin/upload.php1,453 ▲504.38 ▲0.13112.15 ▲6.7146.42 ▼0.18
BH FAQ Settings /wp-admin/options-general.php?page=bh-faq-settings1,0992.6245.4327.36
BH FAQ /wp-admin/edit.php?post_type=bh_faq_faq1,1162.2241.5438.00
Add New /wp-admin/post-new.php?post_type=bh_faq_faq2,1987.67188.6866.67

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_recent-comments
    • can_compress_scripts
    • db_upgraded
    • widget_theysaidso_widget

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)
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
  • 2× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/bh-faq/register-bh-faq-post.php:24
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/bh-faq/bh-faq.php:24

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 97% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
Attributes that require attention:
  • Screenshots: Screenshot #1 (screenshot-3.jpg) image required
The official readme.txt might help

bh-faq/bh-faq.php Passed 13 tests

This is the main PHP file of "BH FAQ" version 1.2, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
72 characters long description:
FAQ plugin. This plugin made with jquery ui. Supported all crosebrowser.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Success! There were no dangerous files found in this plugin12,963 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript22,3961,60212,622
CSS12523206
PHP24827135

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.09
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%
Functions12
▷ Named functions12100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
2 PNG files occupy 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
img/icon_minus.png1.13KB0.28KB▼ 74.87%
img/icon_plus.png1.16KB0.31KB▼ 73.59%