74% flexible-faqs

Code Review | Flexible FAQs - Accordion FAQ Plugin for WordPress

WordPress plugin Flexible FAQs - Accordion FAQ Plugin for WordPress scored74%from 54 tests.

About plugin

  • Plugin page: flexible-faqs
  • Plugin version: 0.5.11
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.8-5.9
  • WordPress version: 6.3.1
  • First release: Aug 4, 2020
  • Latest release: Mar 22, 2022
  • Number of updates: 18
  • Update frequency: every 33.1 days
  • Top authors: dgwyer (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

60+ active /2,440 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
This plugin's installer ran successfully

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

An overview of server-side resources used by Flexible FAQs - Accordion FAQ Plugin for WordPress
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /8.46 ▲5.0074.26 ▲33.16
Dashboard /wp-admin8.48 ▲5.1876.29 ▲24.18
Posts /wp-admin/edit.php8.48 ▲5.1288.91 ▲35.88
Add New Post /wp-admin/post-new.php9.99 ▲4.11131.94 ▲28.34
Media Library /wp-admin/upload.php8.48 ▲5.2576.33 ▲35.69
Freemius Debug [v.2.4.3] /wp-admin/admin.php?page=freemius8.4867.07

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

How much does this plugin use your filesystem and database?
The plugin installed successfully
Filesystem: 264 new files
Database: no new tables, 11 new options
New WordPress options
widget_theysaidso_widget
can_compress_scripts
db_upgraded
widget_recent-comments
flexible_faqs_options
theysaidso_admin_options
widget_recent-posts
fs_debug_mode
fs_active_plugins
fs_accounts
...

Browser metrics Passed 4 tests

A check of browser resources used by Flexible FAQs - Accordion FAQ Plugin for WordPress
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,837 ▲5114.20 ▼0.141.53 ▼0.5330.41 ▼15.31
Dashboard /wp-admin2,238 ▲615.53 ▼0.0395.96 ▲12.3145.47 ▲2.91
Posts /wp-admin/edit.php2,147 ▲471.99 ▲0.0141.10 ▼0.1338.52 ▼2.30
Add New Post /wp-admin/post-new.php6,235 ▲4,70920.15 ▼1.051,011.28 ▲316.2556.50 ▲2.39
Media Library /wp-admin/upload.php1,446 ▲464.20 ▲0.0299.31 ▼5.0344.34 ▲2.28
Freemius Debug [v.2.4.3] /wp-admin/admin.php?page=freemius1,0831.6924.8428.43

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
  • The plugin did not uninstall gracefully
    • > Notice in wp-content/plugins/flexible-faqs/freemius/includes/class-freemius.php+8575
    Undefined property: stdClass::$plugins
  • Zombie WordPress options were found after uninstall: 11 options
    • fs_active_plugins
    • widget_recent-comments
    • widget_theysaidso_widget
    • fs_gdpr
    • can_compress_scripts
    • flexible_faqs_options
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-posts
    • fs_debug_mode
    • ...

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please take a closer look at the following
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function WPGO_Plugins\\Flexible_Faqs\\__() in wp-content/plugins/flexible-faqs/classes/templates/class-faq-post-templates.php:33

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser issues were found

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
3 plugin tags: accordion, woocommerce faq, faq

flexible-faqs/flexible-faqs.php Passed 13 tests

The main PHP script in "Flexible FAQs - Accordion FAQ Plugin for WordPress" version 0.5.11 is automatically included on every request by WordPress
135 characters long description:
The easiest way to manage FAQs on your site. Beautiful drag/drop interface. Designed to handle small or large number of FAQs with ease.

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Everything looks great! No dangerous files found in this plugin64,433 lines of code in 186 files:
LanguageFilesBlank linesComment linesLines of code
PHP1347,78317,72734,332
JavaScript136,7278,19126,876
CSS20307872,428
JSON500736
SVG140161

PHP code 50% from 2 tests

A short review of cyclomatic complexity and code structure
It is recommended to fix the following
  • Class cyclomatic complexity should be reduced to less than 1000 (currently 2,911)
Cyclomatic complexity
Average complexity per logical line of code0.59
Average class complexity62.51
▷ Minimum class complexity1.00
▷ Maximum class complexity2,911.00
Average method complexity4.58
▷ Minimum method complexity1.00
▷ Maximum method complexity86.00
Code structure
Namespaces2
Interfaces0
Traits0
Classes72
▷ Abstract classes22.78%
▷ Concrete classes7097.22%
▷ Final classes00.00%
Methods1,270
▷ Static methods21617.01%
▷ Public methods93073.23%
▷ Protected methods151.18%
▷ Private methods32525.59%
Functions100
▷ Named functions9494.00%
▷ Anonymous functions66.00%
Constants124
▷ Global constants9979.84%
▷ Class constants2520.16%
▷ Public constants25100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
28 PNG files occupy 0.36MB with 0.15MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
api/assets/images/yt.png1.38KB1.10KB▼ 20.55%
assets/images/new-features/bulk-edit-faqs.png11.99KB12.06KB0.00%
api/assets/images/content-censor-thumb.png8.82KB3.89KB▼ 55.92%
api/assets/images/svg-flags-thumb.png14.50KB5.00KB▼ 65.53%
assets/images/new-features/duplicate-faqs.png20.35KB8.02KB▼ 60.59%