89% add-faq-on-any-page

Code Review | Add FAQ on any page

WordPress plugin Add FAQ on any page scored89%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: 6.3.1
  • 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 /622 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
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.01MB] [CPU: ▼4.92ms] Passed 4 tests

This is a short check of server-side resources used by Add FAQ on any page
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0336.15 ▼2.98
Dashboard /wp-admin3.33 ▼0.0244.14 ▼13.80
Posts /wp-admin/edit.php3.38 ▲0.0247.13 ▲5.08
Add New Post /wp-admin/post-new.php5.91 ▲0.0291.09 ▼2.07
Media Library /wp-admin/upload.php3.25 ▲0.0234.67 ▼0.82
Add New /wp-admin/post-new.php?post_type=add_faq_onp3.3643.87
All Items /wp-admin/edit.php?post_type=add_faq_onp3.2943.05

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

Analyzing filesystem and database footprints of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 14 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
can_compress_scripts
widget_recent-comments
db_upgraded
widget_recent-posts
theysaidso_admin_options

Browser metrics Passed 4 tests

A check of browser resources used by Add FAQ on any page
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,855 ▲10914.76 ▲0.411.88 ▲0.0636.12 ▼3.69
Dashboard /wp-admin2,233 ▲424.91 ▼0.98109.91 ▲9.5638.31 ▼5.40
Posts /wp-admin/edit.php2,116 ▲272.05 ▲0.0338.91 ▲4.4635.47 ▲0.04
Add New Post /wp-admin/post-new.php1,556 ▲3422.97 ▼0.21657.12 ▼11.1648.12 ▼14.35
Media Library /wp-admin/upload.php1,415 ▲274.19 ▼0.0393.77 ▼1.2640.53 ▼3.49
Add New /wp-admin/post-new.php?post_type=add_faq_onp2,1637.60172.4562.43
All Items /wp-admin/edit.php?post_type=add_faq_onp1,0992.0234.5632.37

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-posts
    • theysaidso_admin_options
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-comments
    • can_compress_scripts

Smoke tests Passed 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)
Good news, no errors were detected

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
The SRP test was a success

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
These attributes need to be fixed:
  • Screenshots: Screenshot #1 (Admin backend to create question and answer.) image not found
You can take inspiration from this readme.txt

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

The primary PHP file in "Add FAQ on any page" version 1.0 is used by WordPress to initiate all plugin functionality
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 | An overview of files in this plugin; executable files are not allowed
Everything looks great! No dangerous files found in this plugin1,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
There are no cyclomatic complexity problems detected for this plugin
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

All PNG images should be compressed to minimize bandwidth usage for end users
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%
(invalid) assets/banner-772x250.png64.13KB0.00KB▼ 100.00%
assets/screenshot-3.png405.25KB120.20KB▼ 70.34%
(invalid) assets/icon-128x128.png5.56KB0.00KB▼ 100.00%
assets/screenshot-1.png213.79KB65.18KB▼ 69.51%