94% sixa-faq-block

Code Review | sixa FAQ Block

WordPress plugin sixa FAQ Block scored 94% from 54 tests.

About plugin

  • Plugin page: sixa-faq-block
  • Plugin version: 1.0.1
  • PHP compatiblity: 7.3+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.7-5.9
  • WordPress version: 5.9.2
  • First release: Jan 11, 2022
  • Latest release: Mar 25, 2022
  • Number of updates: 5
  • Update frequency: every 14.8 days
  • Top authors: sixa (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 79 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Install script ran successfully

Server metrics [RAM: ▲0.22MB] [CPU: ▼301.09ms] Passed 4 tests

An overview of server-side resources used by sixa FAQ Block
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.79 ▲0.2874.86 ▲17.43
Dashboard /wp-admin3.62 ▲0.2239.46 ▲2.81
Posts /wp-admin/edit.php3.85 ▲0.2143.96 ▲1.11
Add New Post /wp-admin/post-new.php7.21 ▲0.24100.59 ▼1,209.00
Media Library /wp-admin/upload.php3.50 ▲0.2130.05 ▲0.72
All FAQ Items /wp-admin/edit.php?post_type=faq-item3.6032.37
Categories /wp-admin/edit-tags.php?taxonomy=faq-item-category&post_type=faq-item3.6230.75
Add new /wp-admin/post-new.php?post_type=faq-item7.2193.73

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

Analyzing filesystem and database footprints of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 53 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

A check of browser resources used by sixa FAQ Block
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,839 ▲8616.28 ▲0.186.62 ▲0.802.97 ▲0.19
Dashboard /wp-admin2,934 ▲736.18 ▲0.07115.24 ▼19.13154.22 ▼10.32
Posts /wp-admin/edit.php2,728 ▲403.37 ▲0.0160.99 ▼1.41140.07 ▼7.58
Add New Post /wp-admin/post-new.php1,764 ▲5317.58 ▼3.14433.71 ▼5.50295.67 ▲131.21
Media Library /wp-admin/upload.php1,738 ▲405.51 ▲0.08138.50 ▲2.78182.08 ▼2.80
All FAQ Items /wp-admin/edit.php?post_type=faq-item1,4283.2862.37111.43
Categories /wp-admin/edit-tags.php?taxonomy=faq-item-category&post_type=faq-item1,6642.7954.61112.27
Add new /wp-admin/post-new.php?post_type=faq-item9,67618.38604.94147.84

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Uninstaller ran successfully

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Even though everything seems fine, this is not 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 take a closer look at the following
  • 2× PHP files trigger server errors when accessed directly:
    • > PHP Warning
      require(wp-content/plugins/sixa-faq-block/vendor/sixach/wp-snippets/vendor/autoload.php): failed to open stream: No such file or directory in wp-content/plugins/sixa-faq-block/vendor/sixach/wp-snippets/sixa-snippets.php on line 34
    • > PHP Fatal error
      require(): Failed opening required 'wp-content/plugins/sixa-faq-block/vendor/sixach/wp-snippets/vendor/autoload.php' (include_path='.:/usr/share/php') in wp-content/plugins/sixa-faq-block/vendor/sixach/wp-snippets/sixa-snippets.php on line 34

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 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
7 plugin tags: sixa, gutenberg, faq, answers, questions...

sixa-faq-block/index.php 85% from 13 tests

The entry point to "sixa FAQ Block" version 1.0.1 is a PHP file that has certain tags in its header comment area
It is important to fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("sixa-faq-block.php" instead of "index.php")
  • Text Domain: The text domain is optional since WordPress version 4.6; if you do specify it, it must be the same as the plugin slug

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 detected3,843 lines of code in 46 files:
LanguageFilesBlank linesComment linesLines of code
PHP428122,5213,678
JSON200163
CSS1001
JavaScript1001

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.43
Average class complexity16.00
▷ Minimum class complexity1.00
▷ Maximum class complexity56.00
Average method complexity3.24
▷ Minimum method complexity1.00
▷ Maximum method complexity26.00
Code structure
Namespaces12
Interfaces0
Traits0
Classes31
▷ Abstract classes412.90%
▷ Concrete classes2787.10%
▷ Final classes414.81%
Methods202
▷ Static methods9949.01%
▷ Public methods16481.19%
▷ Protected methods2512.38%
▷ Private methods136.44%
Functions10
▷ Named functions110.00%
▷ Anonymous functions990.00%
Constants10
▷ Global constants00.00%
▷ Class constants10100.00%
▷ Public constants880.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
PNG images were not found in this plugin