66% ultimate-faqs

Code Review | Ultimate FAQ - WordPress FAQ and Accordion Plugin

WordPress plugin Ultimate FAQ - WordPress FAQ and Accordion Plugin scored66%from 54 tests.

About plugin

  • Plugin page: ultimate-faqs
  • Plugin version: 2.2.10
  • PHP version: 7.4.16
  • WordPress compatibility: 6.0-6.4
  • WordPress version: 6.3.1
  • First release: Jul 15, 2014
  • Latest release: Nov 7, 2023
  • Number of updates: 570
  • Update frequency: every 6.0 days
  • Top authors: Rustaurius (100%)

Code review

54 tests

User reviews

395 reviews

Install metrics

30,000+ active /1,790,805 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Install script ran successfully

Server metrics [RAM: ▲0.86MB] [CPU: ▼16.33ms] Passed 4 tests

Analyzing server-side resources used by Ultimate FAQ - WordPress FAQ and Accordion Plugin
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /5.05 ▲1.5846.24 ▲4.28
Dashboard /wp-admin4.89 ▲1.5452.05 ▼10.77
Posts /wp-admin/edit.php4.95 ▲1.5960.06 ▲10.27
Add New Post /wp-admin/post-new.php4.61 ▼1.2835.92 ▼69.09
Media Library /wp-admin/upload.php4.81 ▲1.5750.83 ▲14.16
All FAQs /wp-admin/edit.php?post_type=ufaq4.8750.66
Add New /wp-admin/post-new.php?post_type=ufaq4.6137.04
Settings /wp-admin/edit.php?post_type=ufaq&page=ewd-ufaq-settings4.8256.20
Dashboard /wp-admin/edit.php?post_type=ufaq&page=ewd-ufaq-dashboard4.7963.52
FAQ Categories /wp-admin/edit-tags.php?taxonomy=ufaq-category&post_type=ufaq4.8044.38
About Us /wp-admin/edit.php?post_type=ufaq&page=ewd-ufaq-about-us4.7244.66
Ultimate FAQs - Welcome! /wp-admin/index.php?page=ewd-ufaq-getting-started4.7241.62
FAQ Tags /wp-admin/edit-tags.php?taxonomy=ufaq-tag&post_type=ufaq4.8043.93

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

Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 979 new files
Database: no new tables, 13 new options
New WordPress options
widget_recent-comments
widget_ewd_ufaq_display_faq_post_list
widget_ewd_ufaq_popular_reviews_widget
widget_recent-posts
widget_ewd_ufaq_display_random_faq
theysaidso_admin_options
can_compress_scripts
widget_ewd_ufaq_display_recent_faqs
ewd-ufaq-installation-time
widget_theysaidso_widget
...

Browser metrics Passed 4 tests

Ultimate FAQ - WordPress FAQ and Accordion Plugin: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,876 ▲12914.23 ▼0.111.77 ▲0.0939.74 ▼0.12
Dashboard /wp-admin2,247 ▲665.51 ▼0.19100.59 ▼11.4346.03 ▼0.31
Posts /wp-admin/edit.php2,155 ▲552.11 ▲0.1740.19 ▼4.0736.69 ▼1.06
Add New Post /wp-admin/post-new.php6,439 ▲4,91328.13 ▲5.02992.32 ▲347.5642.06 ▼16.29
Media Library /wp-admin/upload.php1,458 ▲554.29 ▲0.1197.10 ▼6.9741.67 ▼6.20
All FAQs /wp-admin/edit.php?post_type=ufaq1,3262.2736.5244.96
Add New /wp-admin/post-new.php?post_type=ufaq1,69916.88899.0644.69
Settings /wp-admin/edit.php?post_type=ufaq&page=ewd-ufaq-settings2,13513.91311.2744.20
Dashboard /wp-admin/edit.php?post_type=ufaq&page=ewd-ufaq-dashboard1,2651.9229.9265.16
FAQ Categories /wp-admin/edit-tags.php?taxonomy=ufaq-category&post_type=ufaq1,3462.1135.7131.87
About Us /wp-admin/edit.php?post_type=ufaq&page=ewd-ufaq-about-us1,2971.9129.3335.04
Ultimate FAQs - Welcome! /wp-admin/index.php?page=ewd-ufaq-getting-started1,2532.2027.2332.17
FAQ Tags /wp-admin/edit-tags.php?taxonomy=ufaq-tag&post_type=ufaq1,3182.0736.2231.51

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • Zombie WordPress options were found after uninstall: 13 options
    • widget_ewd_ufaq_display_faq_categories
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_ewd_ufaq_display_recent_faqs
    • ewd-ufaq-permission-level
    • db_upgraded
    • widget_ewd_ufaq_display_random_faq
    • widget_recent-comments
    • ...

Smoke tests 0% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
These errors were triggered by the plugin
    • > GET request to /wp-admin/post-new.php?post_type=ufaq
    • > Notice in wp-content/plugins/ultimate-faqs/includes/Blocks.class.php+147
    Undefined variable: faq_category_options

SRP 0% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
The following issues need your attention
  • 9× PHP files output text when accessed directly:
    • > /wp-content/plugins/ultimate-faqs/lib/FPDF/tutorial/tuto2.php
    • > /wp-content/plugins/ultimate-faqs/lib/FPDF/tutorial/tuto1.php
    • > /wp-content/plugins/ultimate-faqs/lib/FPDF/tutorial/tuto6.php
    • > /wp-content/plugins/ultimate-faqs/ewd-ufaq-templates/faqs-category-footer.php
    • > /wp-content/plugins/ultimate-faqs/lib/FPDF/tutorial/tuto5.php
    • > /wp-content/plugins/ultimate-faqs/lib/FPDF/tutorial/tuto7.php
    • > /wp-content/plugins/ultimate-faqs/lib/FPDF/tutorial/tuto3.php
    • > /wp-content/plugins/ultimate-faqs/lib/FPDF/tutorial/makefont.php
    • > /wp-content/plugins/ultimate-faqs/lib/FPDF/tutorial/tuto4.php
  • 334× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'PhpOffice\\PhpSpreadsheet\\Style\\Supervisor' not found in wp-content/plugins/ultimate-faqs/lib/PHPSpreadsheet/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Style/Alignment.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'PhpOffice\\PhpSpreadsheet\\Shared\\Trend\\BestFit' not found in wp-content/plugins/ultimate-faqs/lib/PHPSpreadsheet/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Shared/Trend/PolynomialBestFit.php:11
    • > PHP Fatal error
      Uncaught Error: Class 'PhpOffice\\PhpSpreadsheet\\Reader\\BaseReader' not found in wp-content/plugins/ultimate-faqs/lib/PHPSpreadsheet/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Reader/Csv.php:14
    • > PHP Fatal error
      Trait 'PhpOffice\\PhpSpreadsheet\\Calculation\\ArrayEnabled' not found in wp-content/plugins/ultimate-faqs/lib/PHPSpreadsheet/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Financial/Dollar.php on line 11
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/ultimate-faqs/ewd-ufaq-templates/submit-faq-captcha.php:4
    • > PHP Parse error
      syntax error, unexpected ':', expecting ')' in wp-content/plugins/ultimate-faqs/lib/PHPSpreadsheet/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Writer/ZipStream3.php on line 16
    • > PHP Fatal error
      Trait 'PhpOffice\\PhpSpreadsheet\\Calculation\\ArrayEnabled' not found in wp-content/plugins/ultimate-faqs/lib/PHPSpreadsheet/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/MathTrig/Trig/Secant.php on line 9
    • > PHP Fatal error
      Trait 'PhpOffice\\PhpSpreadsheet\\Calculation\\ArrayEnabled' not found in wp-content/plugins/ultimate-faqs/lib/PHPSpreadsheet/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Information/ErrorValue.php on line 7
    • > PHP Fatal error
      Uncaught Error: Class 'PhpOffice\\PhpSpreadsheet\\Writer\\Xlsx\\WriterPart' not found in wp-content/plugins/ultimate-faqs/lib/PHPSpreadsheet/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Writer/Xlsx/Workbook.php:12
    • > PHP Fatal error
      Trait 'PhpOffice\\PhpSpreadsheet\\Calculation\\ArrayEnabled' not found in wp-content/plugins/ultimate-faqs/lib/PHPSpreadsheet/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/DateTimeExcel/Date.php on line 11

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Please take a look at the following user-side issues
    • > GET request to /wp-admin/index.php?page=ewd-ufaq-getting-started
    • > Network (severe)
    wp-content/plugins/ultimate-faqs/assets/css/admin.css?ver=2.2.10 - Failed to load resource: the server responded with a status of 404 (Not Found)

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
6 plugin tags: gutenberg faq, woocommerce faq, faq block, faq, accordion...

ultimate-faqs/ultimate-faqs.php Passed 13 tests

The primary PHP file in "Ultimate FAQ - WordPress FAQ and Accordion Plugin" version 2.2.10 is used by WordPress to initiate all plugin functionality
131 characters long description:
FAQ and accordion plugin with easy to use Gutenberg blocks, shortcodes and widgets. Includes an advanced FAQ search and FAQ schema.

Code Analysis 95% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Everything looks great! No dangerous files found in this plugin106,330 lines of code in 841 files:
LanguageFilesBlank linesComment linesLines of code
PHP66520,24642,88491,728
CSS243542624,088
JavaScript708333763,521
HTML597203,240
Markdown1041101,855
PO File25736201,484
JSON300245
YAML5191284
SVG11039
Bourne Again Shell16324
XML10022

PHP code 0% from 2 tests

This plugin's cyclomatic complexity and code structure detailed below
It is recommended to fix the following
  • Cyclomatic complexity of classes should be reduced to less than 1000 (currently 1,020)
  • Cyclomatic complexity of methods has to be reduced to less than 100 (currently 333)
Cyclomatic complexity
Average complexity per logical line of code0.37
Average class complexity24.59
▷ Minimum class complexity1.00
▷ Maximum class complexity1,020.00
Average method complexity3.57
▷ Minimum method complexity1.00
▷ Maximum method complexity333.00
Code structure
Namespaces74
Interfaces14
Traits1
Classes578
▷ Abstract classes305.19%
▷ Concrete classes54894.81%
▷ Final classes20.36%
Methods5,497
▷ Static methods1,62029.47%
▷ Public methods4,07674.15%
▷ Protected methods2604.73%
▷ Private methods1,16121.12%
Functions91
▷ Named functions3437.36%
▷ Anonymous functions5762.64%
Constants1,423
▷ Global constants110.77%
▷ Class constants1,41299.23%
▷ Public constants1,24588.17%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
55 PNG files occupy 2.00MB with 1.30MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/img/US_Related_Sales_Icon.png23.19KB8.15KB▼ 64.86%
assets/img/Icon_WP_Grey.png36.76KB12.11KB▼ 67.05%
assets/img/premium-screenshots/styling1.png39.49KB14.45KB▼ 63.40%
assets/img/insert_link.png3.57KB1.13KB▼ 68.35%
assets/img/ewd-support-icon-youtube.png1.75KB0.66KB▼ 62.56%