68% bullet-faqs

Code Review | Bullet FAQs

WordPress plugin Bullet FAQs scored68%from 54 tests.

About plugin

  • Plugin page: bullet-faqs
  • Plugin version: 2.1.9
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.1
  • WordPress version: 6.3.1
  • First release: Mar 17, 2014
  • Latest release: Feb 1, 2015
  • Number of updates: 45
  • Update frequency: every 9.0 days
  • Top authors: bappi.d.great (100%)

Code review

54 tests

User reviews

5 reviews

Install metrics

30+ active /3,462 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
This plugin's installer ran successfully

Server metrics [RAM: ▼1.87MB] [CPU: ▼56.18ms] Passed 4 tests

Analyzing server-side resources used by Bullet FAQs
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /2.12 ▼1.355.11 ▼32.75
Dashboard /wp-admin2.14 ▼1.176.20 ▼53.89
Posts /wp-admin/edit.php2.14 ▼1.226.66 ▼38.41
Add New Post /wp-admin/post-new.php2.14 ▼3.755.63 ▼99.65
Media Library /wp-admin/upload.php2.14 ▼1.106.38 ▼26.54
FAQ Categories /wp-admin/edit-tags.php?taxonomy=faq_categories&post_type=faq2.146.51
FAQ Settings /wp-admin/edit.php?post_type=faq&page=faq_settings2.146.93
All FAQs /wp-admin/edit.php?post_type=faq2.147.44
Add New /wp-admin/post-new.php?post_type=faq2.146.77

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

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 15 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-posts
widget_faq_widget
widget_theysaidso_widget
widget_recent-comments
can_compress_scripts
db_upgraded
theysaidso_admin_options

Browser metrics Passed 4 tests

This is an overview of browser requirements for Bullet FAQs
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,957 ▲17113.44 ▼0.997.44 ▲5.2637.05 ▼5.69
Dashboard /wp-admin2,252 ▲785.60 ▲0.0095.62 ▲8.2343.80 ▲6.34
Posts /wp-admin/edit.php2,158 ▲582.14 ▲0.1234.28 ▼6.3432.65 ▼11.21
Add New Post /wp-admin/post-new.php1,577 ▲2923.80 ▲5.49658.18 ▲46.3249.16 ▼20.76
Media Library /wp-admin/upload.php1,457 ▲574.23 ▲0.07100.93 ▲7.8341.55 ▲0.72
FAQ Categories /wp-admin/edit-tags.php?taxonomy=faq_categories&post_type=faq1,3562.2930.4535.25
FAQ Settings /wp-admin/edit.php?post_type=faq&page=faq_settings9202.0224.9927.17
All FAQs /wp-admin/edit.php?post_type=faq1,1361.9329.8532.89
Add New /wp-admin/post-new.php?post_type=faq2,3487.76163.0967.75

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • This plugin cannot be uninstalled
    • > Notice in wp-content/plugins/bullet-faqs/bullet_faqs.php+40
    Undefined property: FAQ::$location
  • This plugin does not fully uninstall, leaving 7 options in the database
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_theysaidso_widget
    • widget_faq_widget
    • can_compress_scripts
    • db_upgraded

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Almost there, just fix the following server-side errors
  • 5 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=faq
    • > Notice in wp-content/plugins/bullet-faqs/bullet_faqs.php+40
    Undefined property: FAQ::$location
  • 13 occurences, only the last one shown
    • > GET request to /wp-admin/edit.php?post_type=faq&page=faq_settings
    • > Notice in wp-content/plugins/bullet-faqs/bullet_faqs.php+226
    Trying to access array offset on value of type bool

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please take a closer look at the following
  • 5× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugins_url() in wp-content/plugins/bullet-faqs/bullet_faqs.php:13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/bullet-faqs/templates/all_view.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/bullet-faqs/lib/widget.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/bullet-faqs/templates/widget_view.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/bullet-faqs/templates/category_view.php:3

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
These attributes need your attention:
  • Plugin Name: You should set the name of your plugin on the first line ( === bullet-faqs === )
You can take inspiration from this readme.txt

bullet-faqs/bullet_faqs.php 85% from 13 tests

The main PHP file in "Bullet FAQs" ver. 2.1.9 adds more information about the plugin and also serves as the entry point for this plugin
It is important to fix the following:
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 398 characters long)
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("bullet-faqs.php" instead of "bullet_faqs.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Everything looks great! No dangerous files found in this plugin738 lines of code in 10 files:
LanguageFilesBlank linesComment linesLines of code
PHP67578373
PO File29292214
CSS1201289
JavaScript1123462

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.28
Average class complexity12.67
▷ Minimum class complexity1.00
▷ Maximum class complexity29.00
Average method complexity2.40
▷ Minimum method complexity1.00
▷ Maximum method complexity10.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods25
▷ Static methods00.00%
▷ Public methods25100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants4100.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
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
images/q-icon.png0.58KB0.65KB0.00%
images/a-icon.png2.31KB0.49KB▼ 78.84%