99% add-faq-on-any-page

Code Review | Add FAQ on any page

WordPress plugin Add FAQ on any page scored 99% from 54 tests.

About plugin

  • Plugin page: add-faq-on-any-page
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.2-4.7.3
  • WordPress version: 5.9.2
  • First release: Mar 16, 2017
  • Latest release: Mar 20, 2017
  • Number of updates: 6
  • Update frequency: every 3.7 days
  • Top authors: ifourkuldeep1 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 479 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.02MB] [CPU: ▼292.55ms] Passed 4 tests

A check of server-side resources used by Add FAQ on any page
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.59 ▲0.0766.10 ▲4.98
Dashboard /wp-admin3.46 ▲0.0537.97 ▼4.04
Posts /wp-admin/edit.php3.68 ▲0.0443.27 ▲1.32
Add New Post /wp-admin/post-new.php6.92 ▼0.05108.65 ▼1,171.98
Media Library /wp-admin/upload.php3.33 ▲0.0436.70 ▲4.51
Add New /wp-admin/post-new.php?post_type=add_faq_onp3.6645.52
All Items /wp-admin/edit.php?post_type=add_faq_onp3.3828.45

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 14 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

A check of browser resources used by Add FAQ on any page
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,802 ▲4816.14 ▲0.396.31 ▲0.282.12 ▼0.73
Dashboard /wp-admin2,927 ▲696.10 ▼0.09114.04 ▼15.61153.72 ▼5.44
Posts /wp-admin/edit.php2,723 ▲293.23 ▼0.0162.01 ▼7.55133.23 ▼5.27
Add New Post /wp-admin/post-new.php1,783 ▲11122.60 ▲1.37406.51 ▼42.95162.57 ▼27.00
Media Library /wp-admin/upload.php1,733 ▲355.51 ▲0.06138.10 ▲4.45181.14 ▲6.51
Add New /wp-admin/post-new.php?post_type=add_faq_onp2,8099.91188.25190.75
All Items /wp-admin/edit.php?post_type=add_faq_onp1,4203.1760.60132.22

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
The plugin uninstalled completely, with no zombie files or tables

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP Passed 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
Congratulations! This plugin passed the SRP test

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 issues were found

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
Attributes that need to be fixed:
  • Screenshots: Add an image for screenshot #1 (Admin backend to create question and answer.)
You can take inspiration from this readme.txt

add-faq-on-any-page/add-faq-on-any-page.php Passed 13 tests

Analyzing the main PHP file in "Add FAQ on any page" version 1.0
96 characters long description:
A plugin to create collapsible panels and shortcodes to call them, pretty usefull for FAQ pages.

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 detected1,252 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
CSS133501,142
PHP31945106
JavaScript1004

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.18
Average class complexity3.00
▷ Minimum class complexity3.00
▷ Maximum class complexity3.00
Average method complexity1.50
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods4
▷ Static methods00.00%
▷ Public methods4100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 0% from 2 tests

Image compression 0% from 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
6 PNG files occupy 0.80MB with 0.65MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/screenshot-2.png112.63KB33.03KB▼ 70.68%
assets/screenshot-1.png213.79KB65.18KB▼ 69.51%
(invalid) assets/icon-256x256.png13.88KB0.00KB▼ 100.00%
assets/screenshot-3.png405.25KB120.20KB▼ 70.34%
(invalid) assets/banner-772x250.png64.13KB0.00KB▼ 100.00%