68% faq-builder-ays

Code Review | FAQ Builder AYS

WordPress plugin FAQ Builder AYS scored68%from 54 tests.

About plugin

  • Plugin page: faq-builder-ays
  • Plugin version: 1.6.8
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-6.4.1
  • WordPress version: 6.3.1
  • First release: Feb 9, 2019
  • Latest release: Nov 28, 2023
  • Number of updates: 168
  • Update frequency: every 10.4 days
  • Top authors: ays-pro (100%)

Code review

54 tests

User reviews

1 review

Install metrics

30+ active /4,971 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 gracefully, with no errors

Server metrics [RAM: ▲0.64MB] [CPU: ▼3.66ms] Passed 4 tests

A check of server-side resources used by FAQ Builder AYS
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /4.18 ▲0.7238.69 ▼4.92
Dashboard /wp-admin3.94 ▲0.6445.93 ▲1.54
Posts /wp-admin/edit.php3.98 ▲0.6250.23 ▲0.03
Add New Post /wp-admin/post-new.php6.61 ▲0.7379.56 ▼11.30
Media Library /wp-admin/upload.php3.82 ▲0.5936.61 ▲3.78
General Settings /wp-admin/admin.php?page=faq-builder-ays-faq-general-settings3.7941.19
How to use /wp-admin/admin.php?page=faq-builder-ays-faq-how-to-use3.7942.16
F.A.Q. Categories /wp-admin/admin.php?page=faq-builder-ays-faq-categories3.7839.73
PRO Features /wp-admin/admin.php?page=faq-builder-ays-featured-plugins3.8438.27
F.A.Q. Builder /wp-admin/admin.php?page=faq-builder-ays3.8040.87

Server storage [IO: ▲2.26MB] [DB: ▲0.01MB] Passed 3 tests

Filesystem and database footprint
This plugin installed successfully
Filesystem: 87 new files
Database: 2 new tables, 10 new options
New tables
wp_ays_faqs
wp_ays_faq_settings
New WordPress options
ays_faq_db_version
ays_faq_banner_time
widget_recent-posts
db_upgraded
widget_recent-comments
widget_theysaidso_widget
ays_faq_sale_dismiss_for_two_month
ays_faq_sale_notification
can_compress_scripts
theysaidso_admin_options

Browser metrics Passed 4 tests

A check of browser resources used by FAQ Builder AYS
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,853 ▲9114.69 ▲0.341.73 ▼0.1130.00 ▼15.27
Dashboard /wp-admin2,256 ▲795.58 ▼0.0393.22 ▼0.9974.68 ▲32.89
Posts /wp-admin/edit.php2,161 ▲611.99 ▲0.0539.62 ▼2.3640.16 ▲3.35
Add New Post /wp-admin/post-new.php6,259 ▲4,73319.50 ▼3.85945.28 ▲292.9036.97 ▼17.77
Media Library /wp-admin/upload.php1,452 ▲494.16 ▼0.0496.40 ▼4.6173.43 ▲30.67
General Settings /wp-admin/admin.php?page=faq-builder-ays-faq-general-settings1,4404.0091.35143.57
How to use /wp-admin/admin.php?page=faq-builder-ays-faq-how-to-use1,4323.9883.52117.52
F.A.Q. Categories /wp-admin/admin.php?page=faq-builder-ays-faq-categories1,3473.9450.9479.71
PRO Features /wp-admin/admin.php?page=faq-builder-ays-featured-plugins1,7203.9249.62102.34
F.A.Q. Builder /wp-admin/admin.php?page=faq-builder-ays1,7203.9648.3990.95

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
It is recommended to fix the following
  • The plugin did not uninstall successfully, leaving 1 table in the database
    • wp_ays_faq_settings
  • Zombie WordPress options were found after uninstall: 9 options
    • widget_recent-comments
    • theysaidso_admin_options
    • db_upgraded
    • ays_faq_sale_dismiss_for_two_month
    • can_compress_scripts
    • widget_theysaidso_widget
    • ays_faq_banner_time
    • ays_faq_sale_notification
    • widget_recent-posts

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP 0% 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
Please fix the following items
  • 1× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/faq-builder-ays/public/partials/faq-builder-ays-public-display.php
  • 9× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/faq-builder-ays/admin/partials/faq-builder-ays-admin-actions.php:14
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/faq-builder-ays/admin/partials/settings/faq-builder-general-settings-display.php:2
    • > PHP Warning
      Use of undefined constant AYS_FAQ_ADMIN_URL - assumed 'AYS_FAQ_ADMIN_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/faq-builder-ays/admin/partials/pro-features/faq-pro-features-display.php on line 9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/faq-builder-ays/admin/partials/faq-builder-ays-admin-display.php:24
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/faq-builder-ays/admin/partials/how-to-use/faq-builder-how-to-use.php:9
    • > PHP Fatal error
      Uncaught Error: Class 'WP_List_Table' not found in wp-content/plugins/faq-builder-ays/includes/lists/faq-builder-ays-faq-list.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/faq-builder-ays/admin/partials/pro-features/faq-pro-features-display.php:10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/faq-builder-ays/admin/partials/categories/faq-builder-ays-categories-display.php:7
    • > PHP Warning
      Use of undefined constant AYS_FAQ_ADMIN_URL - assumed 'AYS_FAQ_ADMIN_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/faq-builder-ays/admin/partials/faq-builder-ays-admin-display.php on line 18

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser errors were detected

Optimizations

Plugin configuration Passed 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
5 plugin tags: toggle faqs, frequently asked questions, faqs, accordion faqs, faq

faq-builder-ays/faq-builder-ays.php Passed 13 tests

"FAQ Builder AYS" version 1.6.8's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
116 characters long description:
Installing FAQ shows how professional is your work and how attentive you are towards your customers, users, visitors

Code Analysis 97% from 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
Good job! No executable or dangerous file extensions detected7,748 lines of code in 46 files:
LanguageFilesBlank linesComment linesLines of code
PHP207009654,256
CSS85001,4672,068
JavaScript71351791,236
SVG1001122
PO File1242866

PHP code 50% from 2 tests

An overview of cyclomatic complexity and code structure
Please fix the following
  • Method cyclomatic complexity should be reduced to less than 100 (currently 166)
Cyclomatic complexity
Average complexity per logical line of code0.47
Average class complexity48.33
▷ Minimum class complexity1.00
▷ Maximum class complexity184.00
Average method complexity5.84
▷ Minimum method complexity1.00
▷ Maximum method complexity166.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes9
▷ Abstract classes00.00%
▷ Concrete classes9100.00%
▷ Final classes00.00%
Methods88
▷ Static methods1112.50%
▷ Public methods8394.32%
▷ Protected methods00.00%
▷ Private methods55.68%
Functions8
▷ Named functions8100.00%
▷ Anonymous functions00.00%
Constants6
▷ Global constants6100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
26 PNG files occupy 0.94MB with 0.48MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
admin/images/faq-256x256.png16.25KB4.46KB▼ 72.53%
admin/images/winter-backround-bundle.png195.70KB95.87KB▼ 51.01%
admin/images/winter_bundle_logo_background_2.png357.75KB171.13KB▼ 52.16%
admin/images/black_friday_banner_logo.png34.91KB35.05KB0.00%
admin/images/ays_pro.png18.67KB4.33KB▼ 76.82%