62% bwl-advanced-faq-manager-lite

Code Review | BWL Advanced FAQ Manager Lite

WordPress plugin BWL Advanced FAQ Manager Lite scored62%from 54 tests.

About plugin

  • Plugin page: bwl-advanced-faq-...
  • Plugin version: 1.0.9
  • PHP compatiblity: 7.3.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.6-6.2.2
  • WordPress version: 6.3.1
  • First release: Sep 15, 2019
  • Latest release: Nov 19, 2023
  • Number of updates: 15
  • Update frequency: every 102.1 days
  • Top authors: xenioushk (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active /1,853 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.14MB] [CPU: ▼1.54ms] Passed 4 tests

Analyzing server-side resources used by BWL Advanced FAQ Manager Lite
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.57 ▲0.1146.25 ▲10.57
Dashboard /wp-admin3.44 ▲0.1045.47 ▼13.54
Posts /wp-admin/edit.php3.56 ▲0.2151.67 ▲4.16
Add New Post /wp-admin/post-new.php6.19 ▲0.3183.98 ▼7.33
Media Library /wp-admin/upload.php3.36 ▲0.1341.67 ▲11.44
Add New FAQ /wp-admin/post-new.php?post_type=bwl_advanced_faq6.1985.66
All FAQs /wp-admin/edit.php?post_type=bwl_advanced_faq3.4240.55
Analytics /wp-admin/edit.php?post_type=bwl_advanced_faq&page=bwl-advanced-faq-analytics3.4545.55
FAQ Category /wp-admin/edit-tags.php?taxonomy=advanced_faq_category&post_type=bwl_advanced_faq3.3633.46
Plugin Info /wp-admin/edit.php?post_type=bwl_advanced_faq&page=bwl-advanced-faq-welcome3.3634.25
FAQ Settings /wp-admin/edit.php?post_type=bwl_advanced_faq&page=bwl-advanced-faq-settings3.3432.03
Plugin Addons /wp-admin/edit.php?post_type=bwl_advanced_faq&page=baf-addons3.3735.18
FAQ Sorting /wp-admin/edit.php?post_type=bwl_advanced_faq&page=bwl_advanced_faq_sort3.3832.66
FAQ Topics /wp-admin/edit-tags.php?taxonomy=advanced_faq_topics&post_type=bwl_advanced_faq3.3638.31

Server storage [IO: ▲5.49MB] [DB: ▲0.08MB] Passed 3 tests

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 190 new files
Database: 3 new tables, 13 new options
New tables
wp_baf_views_data
wp_baf_likes_data
wp_baf_search_keywords_data
New WordPress options
baf_flash_rules_status
widget_baf_categories_widget
bwl_advanced_faq_version
widget_bwl_advanced_faq_manager_widget
baf_lite_installation_date
widget_recent-comments
baf_old_custom_slug
widget_baf_topics_widget
db_upgraded
can_compress_scripts
...

Browser metrics Passed 4 tests

Checking browser requirements for BWL Advanced FAQ Manager Lite
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,034 ▲27213.93 ▼0.417.99 ▲6.4126.34 ▼10.26
Dashboard /wp-admin2,320 ▲1425.01 ▼0.70112.65 ▲2.8788.04 ▲46.17
Posts /wp-admin/edit.php2,230 ▲1332.64 ▲0.7052.30 ▲12.7739.80 ▲0.68
Add New Post /wp-admin/post-new.php1,636 ▲10021.15 ▼1.91850.37 ▲258.8145.91 ▼18.14
Media Library /wp-admin/upload.php1,514 ▲1114.59 ▲0.39121.13 ▲24.7684.38 ▲42.79
Add New FAQ /wp-admin/post-new.php?post_type=bwl_advanced_faq6,37522.96912.99176.90
All FAQs /wp-admin/edit.php?post_type=bwl_advanced_faq1,2632.7347.9535.28
Analytics /wp-admin/edit.php?post_type=bwl_advanced_faq&page=bwl-advanced-faq-analytics1,1312.3643.7540.01
FAQ Category /wp-admin/edit-tags.php?taxonomy=advanced_faq_category&post_type=bwl_advanced_faq1,3982.4547.1737.98
Plugin Info /wp-admin/edit.php?post_type=bwl_advanced_faq&page=bwl-advanced-faq-welcome1,0432.3744.8636.38
FAQ Settings /wp-admin/edit.php?post_type=bwl_advanced_faq&page=bwl-advanced-faq-settings2,4935.14107.0551.83
Plugin Addons /wp-admin/edit.php?post_type=bwl_advanced_faq&page=baf-addons9672.3542.8132.18
FAQ Sorting /wp-admin/edit.php?post_type=bwl_advanced_faq&page=bwl_advanced_faq_sort9632.3839.9529.12
FAQ Topics /wp-admin/edit-tags.php?taxonomy=advanced_faq_topics&post_type=bwl_advanced_faq1,3982.4646.5636.46

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
  • The plugin did not uninstall successfully, leaving 3 tables in the database
    • wp_baf_views_data
    • wp_baf_search_keywords_data
    • wp_baf_likes_data
  • This plugin did not uninstall successfully, leaving 13 options in the database
    • widget_recent-posts
    • db_upgraded
    • baf_lite_installation_date
    • bwl_advanced_faq_version
    • widget_baf_topics_widget
    • widget_recent-comments
    • widget_baf_categories_widget
    • widget_bwl_advanced_faq_manager_widget
    • widget_theysaidso_widget
    • can_compress_scripts
    • ...

Smoke tests 25% 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 0% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please fix the following items
  • 2× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/bwl-advanced-faq-manager-lite/includes/settings/views/sorting-pages/part-all-faq-sort.php
    • > /wp-content/plugins/bwl-advanced-faq-manager-lite/includes/settings/views/sorting-pages/part-taxonomy-items-sort.php
  • 49× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/bwl-advanced-faq-manager-lite/includes/baf_theme_generator.php:460
    • > PHP Fatal error
      Uncaught Error: Class 'BafAnalytics' not found in wp-content/plugins/bwl-advanced-faq-manager-lite/includes/settings/analytics/BafAnalyticsPostsList.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/bwl-advanced-faq-manager-lite/includes/widgets/baf_faqs.php:16
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/bwl-advanced-faq-manager-lite/includes/metainfo/BafMetaInfo.php:10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/bwl-advanced-faq-manager-lite/includes/cpt/BafCustomPostType.php:12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html__() in wp-content/plugins/bwl-advanced-faq-manager-lite/includes/settings/views/tpl_baf_sort.php:14
    • > PHP Fatal error
      Uncaught Error: Class 'BafAnalytics' not found in wp-content/plugins/bwl-advanced-faq-manager-lite/includes/settings/analytics/BafAnalyticsExternalApi.php:4
    • > PHP Warning
      Use of undefined constant BWL_BAF_PLUGIN_TITLE - assumed 'BWL_BAF_PLUGIN_TITLE' (this will throw an Error in a future version of PHP) in wp-content/plugins/bwl-advanced-faq-manager-lite/includes/settings/views/tpl_analytics.php on line 3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/bwl-advanced-faq-manager-lite/includes/BafSearchKeywordsTracker.php:9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/bwl-advanced-faq-manager-lite/includes/tinymce/baf_tiny_mce_config.php:9

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Please fix the following browser errors
  • 9 occurences, only the last one shown
    • > GET request to /wp-admin/edit-tags.php?taxonomy=advanced_faq_topics&post_type=bwl_advanced_faq
    • > Network (severe)
    wp-admin/admin-ajax.php - Failed to load resource: the server responded with a status of 400 (Bad Request)

Optimizations

Plugin configuration 90% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
7 plugin tags: faq search, accordion, advanced faq, faq accordion, faq vote...

bwl-advanced-faq-manager-lite/bwl-advanced-faq-manager-lite.php 77% from 13 tests

Analyzing the main PHP file in "BWL Advanced FAQ Manager Lite" version 1.0.9
It is important to fix the following:
  • Description: Keep the plugin description shorter than 140 characters (currently 209 characters long)
  • Text Domain: The text domain is optional since WordPress version 4.6; if you do specify it, it must be the same as the plugin slug
  • Requires at least: The required version number did not match the one declared in readme.txt ("5.6.5" instead of "5.6")

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
Good job! No executable or dangerous file extensions detected48,613 lines of code in 126 files:
LanguageFilesBlank linesComment linesLines of code
JSON20026,149
SVG40129,519
PHP452,6297364,723
JavaScript281,1554782,884
PO File59181,4772,107
CSS15356801,586
Sass25253261,505
Markdown1710131
XML1009

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.32
Average class complexity5.72
▷ Minimum class complexity1.00
▷ Maximum class complexity19.00
Average method complexity2.39
▷ Minimum method complexity1.00
▷ Maximum method complexity12.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes25
▷ Abstract classes00.00%
▷ Concrete classes25100.00%
▷ Final classes00.00%
Methods85
▷ Static methods1112.94%
▷ Public methods85100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions133
▷ Named functions133100.00%
▷ Anonymous functions00.00%
Constants33
▷ Global constants33100.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
20 PNG files occupy 0.02MB with 0.01MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/arrow_up.png1.03KB0.23KB▼ 77.65%
images/faq_icon.png0.71KB0.65KB▼ 8.56%
libs/tinymce/images/bwl-adv-faq-editor.png0.74KB0.65KB▼ 11.86%
libs/analytics/images/support.png0.60KB0.63KB0.00%
src/images/search.png1.23KB0.49KB▼ 60.46%