83% accordion-faq-plugin

Code Review | Accordion FAQ plugin

WordPress plugin Accordion FAQ plugin scored83%from 54 tests.

About plugin

  • Plugin page: accordion-faq-plugin
  • Plugin version: 2.0.0
  • PHP compatiblity: 7.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 6.0-6.2.0
  • WordPress version: 6.3.1
  • First release: Dec 4, 2015
  • Latest release: Jul 19, 2023
  • Number of updates: 7
  • Update frequency: every 397.9 days
  • Top authors: maheshpatel (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

90+ active /2,628 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.06MB] [CPU: ▼4.77ms] Passed 4 tests

Analyzing server-side resources used by Accordion FAQ plugin
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0745.95 ▲0.60
Dashboard /wp-admin3.37 ▲0.0652.05 ▼2.12
Posts /wp-admin/edit.php3.42 ▲0.0654.20 ▲1.30
Add New Post /wp-admin/post-new.php5.95 ▲0.0689.58 ▼18.84
Media Library /wp-admin/upload.php3.29 ▲0.0636.66 ▲1.72
Add New /wp-admin/post-new.php?post_type=quick_faq3.4556.74
Quick Faq /wp-admin/edit-tags.php?taxonomy=quick_faq_tax&post_type=quick_faq3.2937.44
All Items /wp-admin/edit.php?post_type=quick_faq3.3438.17

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

Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 5 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_recent-comments
can_compress_scripts
db_upgraded
widget_theysaidso_widget
widget_recent-posts

Browser metrics Passed 4 tests

A check of browser resources used by Accordion FAQ plugin
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,956 ▲17013.31 ▼1.049.36 ▲7.2739.80 ▼4.45
Dashboard /wp-admin2,226 ▲525.62 ▼0.0686.02 ▼19.0739.49 ▼6.26
Posts /wp-admin/edit.php2,134 ▲312.02 ▼0.0042.36 ▲4.4435.52 ▲0.19
Add New Post /wp-admin/post-new.php1,552 ▲2223.19 ▲0.09703.85 ▲68.3254.78 ▼8.72
Media Library /wp-admin/upload.php1,434 ▲344.21 ▲0.01101.40 ▼2.0046.54 ▲0.01
Add New /wp-admin/post-new.php?post_type=quick_faq2,9237.76184.6777.65
Quick Faq /wp-admin/edit-tags.php?taxonomy=quick_faq_tax&post_type=quick_faq1,2882.1129.4530.91
All Items /wp-admin/edit.php?post_type=quick_faq1,1511.9631.6631.11

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
You still need to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-comments
    • widget_recent-posts
    • can_compress_scripts
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Good news, no errors were detected

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
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/accordion-faq-plugin/accordion_faq.php:49

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
Attributes that require attention:
  • Tags: Too many tags (20 tag instead of maximum 10); only the first 5 tags are used in your directory listing
The official readme.txt is a good inspiration

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

The principal PHP file in "Accordion FAQ plugin" v. 2.0.0 is loaded by WordPress automatically on each request
It is important to fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("accordion-faq-plugin.php" instead of "accordion_faq.php")
  • Requires at least: Required version does not match the one declared in readme.txt ("4.3.1" instead of "6.0")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Success! There were no dangerous files found in this plugin194 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP12018155
CSS15128
JavaScript19711

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
All good! No complexity issues found
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

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
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%