94% accordion-faq-plugin

Code Review | Accordion FAQ plugin

WordPress plugin Accordion FAQ plugin scored 94% from 54 tests.

About plugin

  • Plugin page: accordion-faq-plugin
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.3.1-4.9.2
  • WordPress version: 5.9.2
  • First release: Dec 4, 2015
  • Latest release: Feb 3, 2018
  • Number of updates: 5
  • Update frequency: every 158.6 days
  • Top authors: maheshpatel (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

100+ active / 2,305 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
This plugin's installer ran successfully

Server metrics [RAM: ▲0.04MB] [CPU: ▼298.91ms] Passed 4 tests

An overview of server-side resources used by Accordion FAQ plugin
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.61 ▲0.0955.75 ▲2.00
Dashboard /wp-admin3.48 ▲0.0733.02 ▼1.38
Posts /wp-admin/edit.php3.70 ▲0.0638.62 ▲1.30
Add New Post /wp-admin/post-new.php6.94 ▼0.03102.74 ▼1,197.57
Media Library /wp-admin/upload.php3.35 ▲0.0626.91 ▲4.20
All Items /wp-admin/edit.php?post_type=quick_faq3.3927.02
Add New /wp-admin/post-new.php?post_type=quick_faq3.7348.29
Quick Faq /wp-admin/edit-tags.php?taxonomy=quick_faq_tax&post_type=quick_faq3.3524.87

Server storage [IO: ▲0.01MB] [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: 3 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

Accordion FAQ plugin: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,836 ▲7816.19 ▲0.176.74 ▲0.762.57 ▲0.08
Dashboard /wp-admin2,925 ▲675.98 ▼0.21120.32 ▼14.64154.42 ▼6.67
Posts /wp-admin/edit.php2,728 ▲343.24 ▲0.0163.51 ▼1.00142.90 ▼1.99
Add New Post /wp-admin/post-new.php1,786 ▲12522.55 ▲6.27397.27 ▼17.26161.13 ▲5.79
Media Library /wp-admin/upload.php1,737 ▲425.54 ▼0.01145.04 ▲6.92185.94 ▲3.75
All Items /wp-admin/edit.php?post_type=quick_faq1,4663.1860.73115.32
Add New /wp-admin/post-new.php?post_type=quick_faq3,71210.13194.73232.24
Quick Faq /wp-admin/edit-tags.php?taxonomy=quick_faq_tax&post_type=quick_faq1,6562.7755.74113.86

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
The plugin uninstalled successfully, without leaving any zombie files or tables

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Almost there! Just fix the following items
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/accordion-faq-plugin/accordion_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)
Everything seems fine on the user side

Optimizations

Plugin configuration 93% 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 your attention:
  • Tags: Please reduce the number of tags, currently 20 tag instead of maximum 10
The official readme.txt is a good inspiration

accordion-faq-plugin/accordion_faq.php 92% from 13 tests

This is the main PHP file of "Accordion FAQ plugin" version 1.0.0, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
Please take the time to fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("accordion-faq-plugin.php" instead of "accordion_faq.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
No dangerous file extensions were detected183 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP13726183

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
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%
Functions6
▷ Named functions6100.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
1 PNG file occupies 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
arrow.png3.18KB0.53KB▼ 83.44%