84% wpfaqblock

Code Review | WPFAQBlock– FAQ & Accordion Plugin For Gutenberg

WordPress plugin WPFAQBlock– FAQ & Accordion Plugin For Gutenberg scored84%from 54 tests.

About plugin

  • Plugin page: wpfaqblock
  • Plugin version: 1.1
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 6.1-6.4
  • WordPress version: 6.3.1
  • First release: Mar 16, 2023
  • Latest release: Nov 8, 2023
  • Number of updates: 23
  • Update frequency: every 10.3 days
  • Top authors: creativewerkdesigns (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /707 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Install script ran successfully

Server metrics [RAM: ▲0.15MB] [CPU: ▼2.16ms] Passed 4 tests

Analyzing server-side resources used by WPFAQBlock– FAQ & Accordion Plugin For Gutenberg
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.61 ▲0.1440.92 ▼1.64
Dashboard /wp-admin3.44 ▲0.1350.44 ▲2.64
Posts /wp-admin/edit.php3.55 ▲0.1944.17 ▼7.84
Add New Post /wp-admin/post-new.php6.10 ▲0.2186.46 ▼1.23
Media Library /wp-admin/upload.php3.36 ▲0.1338.28 ▲2.07
FAQ Tags /wp-admin/edit-tags.php?taxonomy=wpfaqblock_tag&post_type=wpfaqblock3.3534.75
All FAQs /wp-admin/edit.php?post_type=wpfaqblock3.4037.03
Add New /wp-admin/post-new.php?post_type=wpfaqblock6.0976.39
FAQ Categories /wp-admin/edit-tags.php?taxonomy=wpfaqblock_category&post_type=wpfaqblock3.3535.62

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

A short overview of filesystem and database impact
This plugin was installed successfully
Filesystem: 20 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
theysaidso_admin_options
can_compress_scripts
widget_recent-posts
widget_recent-comments
db_upgraded

Browser metrics Passed 4 tests

An overview of browser requirements for WPFAQBlock– FAQ & Accordion Plugin For Gutenberg
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,858 ▲7114.25 ▲0.041.90 ▼0.1642.09 ▼4.96
Dashboard /wp-admin2,255 ▲775.58 ▼0.2191.12 ▼24.6443.54 ▲1.57
Posts /wp-admin/edit.php2,160 ▲632.00 ▼0.0337.23 ▲1.4233.27 ▼2.24
Add New Post /wp-admin/post-new.php6,403 ▲4,87727.76 ▲4.54937.25 ▲225.0039.40 ▼20.46
Media Library /wp-admin/upload.php1,456 ▲534.24 ▲0.1294.59 ▼15.6539.90 ▼6.76
FAQ Tags /wp-admin/edit-tags.php?taxonomy=wpfaqblock_tag&post_type=wpfaqblock1,3022.1527.4530.95
All FAQs /wp-admin/edit.php?post_type=wpfaqblock1,1381.9531.5328.87
Add New /wp-admin/post-new.php?post_type=wpfaqblock1,52816.77784.7231.01
FAQ Categories /wp-admin/edit-tags.php?taxonomy=wpfaqblock_category&post_type=wpfaqblock1,3302.1528.7632.23

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • db_upgraded
    • widget_recent-posts
    • widget_theysaidso_widget
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please fix the following items
  • 10× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/wpfaqblock/includes/templates/template-1.php on line 14
    • > PHP Notice
      Undefined variable: query in wp-content/plugins/wpfaqblock/includes/templates/template-1.php on line 36
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/wpfaqblock/includes/templates/template-1.php on line 18
    • > PHP Notice
      Undefined variable: args in wp-content/plugins/wpfaqblock/includes/templates/template-1.php on line 10
    • > PHP Fatal error
      Uncaught Error: Call to a member function have_posts() on null in wp-content/plugins/wpfaqblock/includes/templates/template-1.php:36
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugins_url() in wp-content/plugins/wpfaqblock/wpfaqblock.php:21
    • > PHP Notice
      Undefined variable: args in wp-content/plugins/wpfaqblock/includes/templates/template-1.php on line 14
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/wpfaqblock/includes/class-wpfaqblock-plugin-settings.php:34
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/wpfaqblock/includes/templates/template-1.php on line 10
    • > PHP Notice
      Undefined variable: args in wp-content/plugins/wpfaqblock/includes/templates/template-1.php on line 18

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 Passed 29 tests

readme.txt Passed 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
7 plugin tags: faq, block faqs, faq block, accordion, faqs...

wpfaqblock/wpfaqblock.php Passed 13 tests

"WPFAQBlock– FAQ & Accordion Plugin For Gutenberg" version 1.1's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
90 characters long description:
Simple FAQ and accordion plugin with easy to use Gutenberg blocks, shortcodes and widgets.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
No dangerous file extensions were detected757 lines of code in 18 files:
LanguageFilesBlank linesComment linesLines of code
PHP518183356
CSS5103301
JavaScript431546
JSON10042
SVG30012

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.32
Average class complexity10.50
▷ Minimum class complexity4.00
▷ Maximum class complexity17.00
Average method complexity2.19
▷ Minimum method complexity1.00
▷ Maximum method complexity8.00
Code structure
Namespaces2
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes150.00%
Methods16
▷ Static methods850.00%
▷ Public methods1487.50%
▷ Protected methods00.00%
▷ Private methods212.50%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants19
▷ Global constants19100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
No PNG files were detected