77% ultimate-faq-solution

Code Review | Ultimate FAQ Solution

WordPress plugin Ultimate FAQ Solution scored77%from 54 tests.

About plugin

  • Plugin page: ultimate-faq-solu...
  • Plugin version: 1.4.3
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.1-6.3.1
  • WordPress version: 6.3.1
  • First release: Oct 21, 2019
  • Latest release: Sep 4, 2023
  • Number of updates: 39
  • Update frequency: every 36.3 days
  • Top authors: braintum (100%)

Code review

54 tests

User reviews

7 reviews

Install metrics

300+ active /3,830 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Install script ran successfully

Server metrics [RAM: ▲0.16MB] [CPU: ▼0.30ms] Passed 4 tests

A check of server-side resources used by Ultimate FAQ Solution
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0539.74 ▲0.71
Dashboard /wp-admin3.51 ▲0.2153.95 ▲6.63
Posts /wp-admin/edit.php3.56 ▲0.2153.37 ▲6.37
Add New Post /wp-admin/post-new.php6.09 ▲0.2190.93 ▼7.42
Media Library /wp-admin/upload.php3.41 ▲0.1833.98 ▼0.86
Manage FAQ Groups /wp-admin/edit.php?post_type=ufaqsw3.6144.04
New FAQ Group /wp-admin/post-new.php?post_type=ufaqsw3.8759.30
Settings & Help /wp-admin/edit.php?post_type=ufaqsw&page=ufaqsw-settings3.5041.79

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

Filesystem and database footprint
This plugin installed successfully
Filesystem: 422 new files
Database: no new tables, 10 new options
New WordPress options
widget_recent-posts
ufaqsw_live_search_loading_text
ufaqsw_search_result_not_found
theysaidso_admin_options
ufaqsw_live_search_text
can_compress_scripts
db_upgraded
widget_recent-comments
widget_theysaidso_widget
ufaqsw_enable_search

Browser metrics Passed 4 tests

Checking browser requirements for Ultimate FAQ Solution
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,093 ▲34715.30 ▲1.025.59 ▲3.8041.85 ▼1.80
Dashboard /wp-admin2,393 ▲2056.63 ▲1.75130.88 ▲14.8440.38 ▼4.05
Posts /wp-admin/edit.php2,296 ▲2073.51 ▲1.4957.47 ▲20.7835.25 ▲3.79
Add New Post /wp-admin/post-new.php1,555 ▲2223.30 ▼0.18644.95 ▼35.9735.77 ▼24.98
Media Library /wp-admin/upload.php1,435 ▲474.27 ▲0.0693.78 ▼15.3144.03 ▼1.37
Manage FAQ Groups /wp-admin/edit.php?post_type=ufaqsw11,5954.5294.0228.06
New FAQ Group /wp-admin/post-new.php?post_type=ufaqsw13,49910.19247.7068.41
Settings & Help /wp-admin/edit.php?post_type=ufaqsw&page=ufaqsw-settings11,8004.2195.7831.49

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
Please fix the following items
  • Zombie WordPress options detected upon uninstall: 10 options
    • widget_theysaidso_widget
    • can_compress_scripts
    • ufaqsw_enable_search
    • widget_recent-posts
    • ufaqsw_search_result_not_found
    • widget_recent-comments
    • db_upgraded
    • theysaidso_admin_options
    • ufaqsw_live_search_loading_text
    • ufaqsw_live_search_text

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though everything seems fine, this is not 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
  • 1× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/ultimate-faq-solution/init.php
  • 40× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_Type_Text' not found in wp-content/plugins/ultimate-faq-solution/vendor/cmb2/cmb2/includes/types/CMB2_Type_File_Base.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_Type_Taxonomy_Base' not found in wp-content/plugins/ultimate-faq-solution/vendor/cmb2/cmb2/includes/types/CMB2_Type_Taxonomy_Multicheck.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_Hookup_Base' not found in wp-content/plugins/ultimate-faq-solution/vendor/cmb2/cmb2/includes/rest-api/CMB2_REST.php:19
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_Type_Taxonomy_Select' not found in wp-content/plugins/ultimate-faq-solution/vendor/cmb2/cmb2/includes/types/CMB2_Type_Taxonomy_Select_Hierarchical.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_Type_Taxonomy_Radio' not found in wp-content/plugins/ultimate-faq-solution/vendor/cmb2/cmb2/includes/types/CMB2_Type_Taxonomy_Radio_Hierarchical.php:13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/ultimate-faq-solution/templates/all/template.php:2
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_Base' not found in wp-content/plugins/ultimate-faq-solution/vendor/cmb2/cmb2/includes/CMB2.php:21
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_Type_Taxonomy_Base' not found in wp-content/plugins/ultimate-faq-solution/vendor/cmb2/cmb2/includes/types/CMB2_Type_Taxonomy_Select.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_Type_Counter_Base' not found in wp-content/plugins/ultimate-faq-solution/vendor/cmb2/cmb2/includes/types/CMB2_Type_Textarea.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_Type_Base' not found in wp-content/plugins/ultimate-faq-solution/vendor/cmb2/cmb2/includes/types/CMB2_Type_Counter_Base.php:13

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)
No browser errors were detected

Optimizations

Plugin configuration 86% from 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
7 plugin tags: faq-directory, product-faq, toggle, woocommerce-faq, faq...

ultimate-faq-solution/init.php 69% from 13 tests

The main PHP file in "Ultimate FAQ Solution" ver. 1.4.3 adds more information about the plugin and also serves as the entry point for this plugin
Please take the time to fix the following:
  • Requires PHP: Required version does not match the one declared in readme.txt ("7.4.0" instead of "7.4")
  • Description: Please don't use more than 140 characters for the plugin description (currently 308 characters long)
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("ultimate-faq-solution.php" instead of "init.php")
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug

Code Analysis Passed 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
Success! There were no dangerous files found in this plugin76,650 lines of code in 264 files:
LanguageFilesBlank linesComment linesLines of code
PO File12014,31518,50232,323
JSON40023,310
PHP862,6646,9039,218
CSS192641,1954,941
SVG2102,684
JavaScript134756271,995
Sass17306291,411
Markdown32490768

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.47
Average class complexity18.81
▷ Minimum class complexity1.00
▷ Maximum class complexity188.00
Average method complexity3.35
▷ Minimum method complexity1.00
▷ Maximum method complexity60.00
Code structure
Namespaces3
Interfaces0
Traits0
Classes81
▷ Abstract classes911.11%
▷ Concrete classes7288.89%
▷ Final classes00.00%
Methods619
▷ Static methods11819.06%
▷ Public methods52484.65%
▷ Protected methods8914.38%
▷ Private methods60.97%
Functions59
▷ Named functions5898.31%
▷ Anonymous functions11.69%
Constants15
▷ Global constants960.00%
▷ Class constants640.00%
▷ Public constants6100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
15 PNG files occupy 0.03MB with 0.01MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
vendor/cmb2/cmb2/images/ico-delete.png0.70KB0.72KB0.00%
vendor/cmb2/cmb2/images/ui-bg_flat_75_ffffff_40x100.png0.17KB0.08KB▼ 51.12%
vendor/cmb2/cmb2/images/ui-icons_cd0a0a_256x240.png4.27KB4.11KB▼ 3.78%
assets/logo.png10.73KB4.48KB▼ 58.25%
vendor/cmb2/cmb2/images/ui-icons_888888_256x240.png5.23KB4.11KB▼ 21.49%