68% website-faqs

Code Review | Website FAQ (Responsive and Categorized with Shortcode)

WordPress plugin Website FAQ (Responsive and Categorized with Shortcode) scored68%from 54 tests.

About plugin

  • Plugin page: website-faqs
  • Plugin version: 1.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.1-5.8
  • WordPress version: 6.3.1
  • First release: Sep 10, 2015
  • Latest release: Aug 22, 2021
  • Number of updates: 8
  • Update frequency: every 271.6 days
  • Top authors: nikunjsoni (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,021 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▼1.94MB] [CPU: ▼56.14ms] Passed 4 tests

A check of server-side resources used by Website FAQ (Responsive and Categorized with Shortcode)
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /2.06 ▼1.404.14 ▼36.88
Dashboard /wp-admin2.08 ▼1.275.92 ▼54.46
Posts /wp-admin/edit.php2.08 ▼1.286.43 ▼35.87
Add New Post /wp-admin/post-new.php2.08 ▼3.816.35 ▼97.36
Media Library /wp-admin/upload.php2.08 ▼1.155.06 ▼30.06
All FAQ /wp-admin/edit.php?post_type=website_faq2.086.03
Add New /wp-admin/post-new.php?post_type=website_faq2.087.43
Tags /wp-admin/edit-tags.php?taxonomy=post_tag&post_type=website_faq2.085.38
Categories /wp-admin/edit-tags.php?taxonomy=category&post_type=website_faq2.087.61

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

A short overview of filesystem and database impact
There were no storage issued detected upon installing this plugin
Filesystem: 29 new files
Database: no new tables, 7 new options
New WordPress options
db_upgraded
widget_recent-posts
widget_recent-comments
widget_theysaidso_widget
can_compress_scripts
theysaidso_admin_options
category_children

Browser metrics Passed 4 tests

An overview of browser requirements for Website FAQ (Responsive and Categorized with Shortcode)
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,987 ▲24115.43 ▲0.8510.55 ▲8.8337.76 ▼7.95
Dashboard /wp-admin2,249 ▲645.83 ▲0.96112.71 ▲12.8642.05 ▲4.24
Posts /wp-admin/edit.php2,141 ▲552.72 ▲0.7044.42 ▲5.2135.41 ▲0.40
Add New Post /wp-admin/post-new.php1,552 ▲2423.46 ▲5.33688.96 ▲52.6750.69 ▼10.11
Media Library /wp-admin/upload.php1,437 ▲495.11 ▲0.93101.30 ▼0.0340.65 ▼1.05
All FAQ /wp-admin/edit.php?post_type=website_faq1,1572.6840.3131.31
Add New /wp-admin/post-new.php?post_type=website_faq2,3837.85178.0066.44
Tags /wp-admin/edit-tags.php?taxonomy=post_tag&post_type=website_faq1,3562.2538.7634.75
Categories /wp-admin/edit-tags.php?taxonomy=category&post_type=website_faq1,4952.5334.5734.33

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
The following items require your attention
  • The plugin did not uninstall gracefully
    • > User notice in wp-includes/functions.php+5905
    Function wp_register_style was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the website-faq-style handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
  • Zombie WordPress options were found after uninstall: 7 options
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_recent-comments
    • category_children
    • widget_theysaidso_widget
    • can_compress_scripts

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/edit-tags.php?taxonomy=category&post_type=website_faq
    • > User notice in wp-includes/functions.php+5905
    Function wp_register_style was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the website-faq-style handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
  • 5 occurences, only the last one shown
    • > GET request to /wp-admin/edit-tags.php?taxonomy=category&post_type=website_faq
    • > User notice in wp-includes/functions.php+5905
    Function wp_register_script was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the awebsite-faq-script handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
  • 5 occurences, only the last one shown
    • > GET request to /wp-admin/edit-tags.php?taxonomy=category&post_type=website_faq
    • > User notice in wp-includes/functions.php+5905
    Function wp_enqueue_style was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the website-faq-style handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
  • 5 occurences, only the last one shown
    • > GET request to /wp-admin/edit-tags.php?taxonomy=category&post_type=website_faq
    • > User notice in wp-includes/functions.php+5905
    Function wp_enqueue_script was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the awebsite-faq-script handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)

SRP 50% 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
Please fix the following
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/website-faqs/website-faq.php:47

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)
There were no browser issues found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
Attributes that require attention:
  • Tags: Please reduce the number of tags, currently 12 tag instead of maximum 10
  • Screenshots: These screenshots require images: #1 (All FAQ in Frontend), #2 (All FAQ in Backend), #3 (Add new FAQ), #4 (FAQ categories list), #5 (Adding shortcode), #6 (FAQ with category in Backend), #7 (FAQ with category in Frontend)
You can look at the official readme.txt

website-faqs/website-faq.php 92% from 13 tests

Analyzing the main PHP file in "Website FAQ (Responsive and Categorized with Shortcode)" version 1.2
Please make the necessary changes and fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("website-faqs.php" instead of "website-faq.php")

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
Everything looks great! No dangerous files found in this plugin13,795 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript12,3961,60212,619
CSS235531,083
PHP1181493

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.17
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
24 compressed PNG files occupy 0.54MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
css/images/website-faq-arrow-left.png0.36KB0.33KB▼ 7.92%
css/images/ui-bg_glass_55_fbf9ee_1x400.png0.12KB0.14KB0.00%
css/images/ui-icons_2e83ff_256x240.png4.27KB4.11KB▼ 3.78%
css/images/ui-bg_glass_75_e6e6e6_1x400.png0.11KB0.14KB0.00%
css/images/ui-icons_222222_256x240.png4.27KB4.11KB▼ 3.78%