93% wpb-advanced-faq

Code Review | WPB Advanced FAQ

WordPress plugin WPB Advanced FAQ scored 93% from 54 tests.

About plugin

  • Plugin page: wpb-advanced-faq
  • Plugin version: 1.06
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-5.8.2
  • WordPress version: 5.9.2
  • First release: Aug 12, 2015
  • Latest release: Nov 13, 2021
  • Number of updates: 21
  • Update frequency: every 108.8 days
  • Top authors: wpbean (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

600+ active / 9,097 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.05MB] [CPU: ▼311.74ms] Passed 4 tests

Server-side resources used by WPB Advanced FAQ
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.57 ▲0.0554.25 ▼3.57
Dashboard /wp-admin3.46 ▲0.0634.88 ▲0.95
Posts /wp-admin/edit.php3.69 ▲0.0539.57 ▼5.01
Add New Post /wp-admin/post-new.php7.03 ▲0.06101.04 ▼1,237.19
Media Library /wp-admin/upload.php3.34 ▲0.0526.58 ▼1.17
All FAQ's /wp-admin/edit.php?post_type=wpb_af_faq3.3828.95
Tag /wp-admin/edit-tags.php?taxonomy=wpb_af_faq_tags&post_type=wpb_af_faq3.3427.53
Category /wp-admin/edit-tags.php?taxonomy=wpb_af_faq_category&post_type=wpb_af_faq3.3525.99
Add New /wp-admin/post-new.php?post_type=wpb_af_faq7.0289.81

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

Filesystem and database footprint
This plugin was installed successfully
Filesystem: 18 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

A check of browser resources used by WPB Advanced FAQ
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,962 ▲20816.11 ▲0.4111.31 ▲5.512.64 ▼0.15
Dashboard /wp-admin2,934 ▲736.12 ▼0.09118.12 ▼10.12172.25 ▲2.82
Posts /wp-admin/edit.php2,738 ▲473.25 ▲0.0164.06 ▲2.24144.97 ▼3.46
Add New Post /wp-admin/post-new.php1,701 ▲3821.70 ▲2.28404.54 ▼39.33202.18 ▲18.64
Media Library /wp-admin/upload.php1,742 ▲415.52 ▲0.04184.75 ▲33.27190.73 ▼1.28
All FAQ's /wp-admin/edit.php?post_type=wpb_af_faq1,4543.1767.95164.73
Tag /wp-admin/edit-tags.php?taxonomy=wpb_af_faq_tags&post_type=wpb_af_faq1,6382.6579.97103.60
Category /wp-admin/edit-tags.php?taxonomy=wpb_af_faq_category&post_type=wpb_af_faq1,6812.7654.85121.61
Add New /wp-admin/post-new.php?post_type=wpb_af_faq9,66319.62606.14191.97

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Uninstaller ran successfully

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Everything seems fine, however this is by no means an exhaustive test

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
  • 3× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wpb-advanced-faq/inc/wpb-af-cpt.php:67
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/wpb-advanced-faq/inc/wpb-af-shortcode.php:84
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/wpb-advanced-faq/inc/wpb-af-functions.php:14

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser issues were found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
Attributes that need to be fixed:
  • Tags: There are too many tags (27 tag instead of maximum 10)
You can take inspiration from this readme.txt

wpb-advanced-faq/main.php 85% from 13 tests

The main PHP file in "WPB Advanced FAQ" ver. 1.06 adds more information about the plugin and also serves as the entry point for this plugin
You should first fix the following items:
  • Main file name: Name the main plugin file the same as the plugin slug ("wpb-advanced-faq.php" instead of "main.php")
  • Description: Please keep the plugin description shorter than 140 characters (currently 291 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
There were no executable files found in this plugin1,043 lines of code in 13 files:
LanguageFilesBlank linesComment linesLines of code
CSS31311335
JavaScript342112283
PHP59671279
PO File14444104
SVG10042

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 code0.22
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%
Functions13
▷ Named functions13100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
PNG images were not found in this plugin