67% wp-awesome-faq

Code Review | Master Accordion ( Former WP Awesome FAQ Plugin )

WordPress plugin Master Accordion ( Former WP Awesome FAQ Plugin ) scored 67% from 54 tests.

About plugin

  • Plugin page: wp-awesome-faq
  • Plugin version: 4.1.9
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-5.9.2
  • WordPress version: 6.3.1
  • First release: Jun 23, 2013
  • Latest release: Aug 21, 2023
  • Number of updates: 66
  • Update frequency: every 56.2 days
  • Top authors: Litonice13 (100%)

Code review

54 tests

User reviews

29 reviews

Install metrics

1,000+ active / 132,501 total downloads

Benchmarks

Plugin footprint 65% 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 gracefully, with no errors

Server metrics [RAM: ▲4.85MB] [CPU: ▲10.19ms] Passed 4 tests

This is a short check of server-side resources used by Master Accordion ( Former WP Awesome FAQ Plugin )
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /8.69 ▲5.2363.02 ▲20.23
Dashboard /wp-admin8.71 ▲5.4178.83 ▲28.44
Posts /wp-admin/edit.php8.71 ▲5.3673.30 ▲23.74
Add New Post /wp-admin/post-new.php9.27 ▲3.3976.74 ▼26.67
Media Library /wp-admin/upload.php8.71 ▲5.4865.21 ▲23.45
Freemius Debug [v.2.4.3] /wp-admin/admin.php?page=freemius8.7162.95

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

Input-output and database impact of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 217 new files
Database: no new tables, 13 new options
New WordPress options
widget_recent-comments
db_upgraded
fs_active_plugins
fs_debug_mode
widget_recent-posts
fs_accounts
widget_theysaidso_widget
jltmaf_settings
can_compress_scripts
jltmaf_content
...

Browser metrics Passed 4 tests

Master Accordion ( Former WP Awesome FAQ Plugin ): an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,129 ▲37215.42 ▲1.187.14 ▲5.1928.34 ▼14.59
Dashboard /wp-admin2,416 ▲2306.70 ▲1.73124.56 ▲9.6742.53 ▲2.70
Posts /wp-admin/edit.php2,325 ▲2333.64 ▲1.6550.54 ▲10.3331.80 ▼2.92
Add New Post /wp-admin/post-new.php1,567 ▲3422.98 ▼0.54659.19 ▼12.4937.51 ▼24.62
Media Library /wp-admin/upload.php1,461 ▲794.40 ▲0.1985.74 ▼21.0247.58 ▼0.22
Freemius Debug [v.2.4.3] /wp-admin/admin.php?page=freemius1,2953.3349.5233.39

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
These items require your attention
  • This plugin did not uninstall without warnings or errors
    • > Notice in wp-content/plugins/wp-awesome-faq/freemius/includes/class-freemius.php+8575
    Undefined property: stdClass::$plugins
  • Zombie WordPress options detected upon uninstall: 13 options
    • db_upgraded
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • fs_debug_mode
    • can_compress_scripts
    • widget_recent-posts
    • fs_accounts
    • jltmaf_free_vs_pro
    • jltmaf_content
    • widget_recent-comments
    • ...

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP 0% 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 perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/wp-awesome-faq/lib/shortcodes.php
  • 15× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'JT_Colorful_FAQ_Settings_API_Class' not found in wp-content/plugins/wp-awesome-faq/admin/colorful-faq-settings.php:11
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wp-awesome-faq/inc/faq-gutenberg.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/wp-awesome-faq/inc/faq-shortcodes.php:174
    • > PHP Warning
      include_once(ABSPATHwp-admin/includes/plugin.php): failed to open stream: No such file or directory in wp-content/plugins/wp-awesome-faq/inc/faq-dependecies.php on line 6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wp-awesome-faq/inc/faq-cpt.php:73
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/wp-awesome-faq/inc/faq-dependecies.php on line 6
    • > PHP Warning
      include_once(): Failed opening 'ABSPATHwp-admin/includes/plugin.php' for inclusion (include_path='.:/usr/share/php') in wp-content/plugins/wp-awesome-faq/inc/faq-dependecies.php on line 6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wp-awesome-faq/lib/sorting.php:20
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/wp-awesome-faq/inc/helper-functions.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/wp-awesome-faq/lib/define.php:9

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser issues were found

Optimizations

Plugin configuration 90% 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: Please add images for these screenshots: #1 (FAQ Posts lists), #2 (Front End FAQ Output), #3 (FAQ's by Category), #4 (Category added Shortcode FAQ's by ID), #5 (Editor Button FAQ), #6 (Popup Editor FAQ Button), #7 (FAQ Settings. Options Added: Close All, Open All and 1st Item Open.)
You can look at the official readme.txt

wp-awesome-faq/wp-awesome-faq.php 85% from 13 tests

The main PHP script in "Master Accordion ( Former WP Awesome FAQ Plugin )" version 4.1.9 is automatically included on every request by WordPress
You should first fix the following items:
  • 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
  • Description: Please don't use more than 140 characters for the plugin description (currently 164 characters long)

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Good job! No executable or dangerous file extensions detected47,389 lines of code in 164 files:
LanguageFilesBlank linesComment linesLines of code
PHP1257,80316,42833,225
PO File105,8007,02512,736
CSS182925902
JavaScript10175193507
SVG10019

PHP code 50% from 2 tests

An overview of cyclomatic complexity and code structure
The following items need your attention
  • Please reduce cyclomatic complexity of classes to less than 1000 (currently 2,911)
Cyclomatic complexity
Average complexity per logical line of code0.62
Average class complexity85.00
▷ Minimum class complexity1.00
▷ Maximum class complexity2,911.00
Average method complexity4.51
▷ Minimum method complexity1.00
▷ Maximum method complexity86.00
Code structure
Namespaces2
Interfaces0
Traits0
Classes49
▷ Abstract classes24.08%
▷ Concrete classes4795.92%
▷ Final classes12.13%
Methods1,197
▷ Static methods17714.79%
▷ Public methods85371.26%
▷ Protected methods191.59%
▷ Private methods32527.15%
Functions129
▷ Named functions12899.22%
▷ Anonymous functions10.78%
Constants133
▷ Global constants10679.70%
▷ Class constants2720.30%
▷ Public constants27100.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
9 PNG files occupy 0.21MB with 0.13MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
freemius/assets/img/theme-icon.png10.97KB5.78KB▼ 47.37%
screenshot-1.png58.24KB21.69KB▼ 62.76%
screenshot-4.png25.34KB8.14KB▼ 67.87%
screenshot-6.png27.35KB7.53KB▼ 72.48%
lib/shortcode-icon.png1.36KB0.52KB▼ 62.01%