84% flexible-faq

Code Review | Flexible FAQ

WordPress plugin Flexible FAQ scored84%from 54 tests.

About plugin

  • Plugin page: flexible-faq
  • Plugin version: 0.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-4.0
  • WordPress version: 6.3.1
  • First release: Jul 16, 2014
  • Latest release: Sep 27, 2014
  • Number of updates: 13
  • Update frequency: every 5.6 days
  • Top authors: bagerathan (100%)

Code review

54 tests

User reviews

5 reviews

Install metrics

1,000+ active /8,760 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
Installer ran successfully

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

Analyzing server-side resources used by Flexible FAQ
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.81 ▲0.0844.85 ▲1.17
Dashboard /wp-admin3.64 ▲0.0149.94 ▼17.82
Posts /wp-admin/edit.php3.75 ▲0.0752.43 ▼0.65
Add New Post /wp-admin/post-new.php6.22 ▲0.0795.34 ▼4.51
Media Library /wp-admin/upload.php3.56 ▲0.0741.95 ▲4.05
Add New /wp-admin/post-new.php?post_type=faq3.6854.60
All FAQ /wp-admin/edit.php?post_type=faq3.6138.48
Categories /wp-admin/edit-tags.php?taxonomy=faq-category&post_type=faq3.5536.85

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

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

Browser metrics Passed 4 tests

A check of browser resources used by Flexible FAQ
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,931 ▲17013.85 ▼0.449.32 ▲7.5742.09 ▲2.19
Dashboard /wp-admin2,226 ▲585.68 ▲0.0894.07 ▲1.4642.92 ▲0.01
Posts /wp-admin/edit.php2,131 ▲282.12 ▲0.1441.06 ▼1.9735.17 ▼2.14
Add New Post /wp-admin/post-new.php1,572 ▲4123.28 ▲0.15600.04 ▼5.2548.46 ▼6.72
Media Library /wp-admin/upload.php1,431 ▲314.20 ▼0.00102.52 ▼1.0844.33 ▼0.81
Add New /wp-admin/post-new.php?post_type=faq2,2927.71179.5867.33
All FAQ /wp-admin/edit.php?post_type=faq1,1062.3137.4230.48
Categories /wp-admin/edit-tags.php?taxonomy=faq-category&post_type=faq1,3052.1427.6730.34

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
It is recommended to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_theysaidso_widget
    • can_compress_scripts
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Good news, no errors were detected

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
Almost there! Just fix the following items
  • 3× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugins_url() in wp-content/plugins/flexible-faq/flexible-faq.php:12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/flexible-faq/inc/shortcodes.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/flexible-faq/inc/reorder.php:2

User-side errors Passed 1 test

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

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
3 plugin tags: faq, q and a, q a

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

The main PHP script in "Flexible FAQ" version 0.2 is automatically included on every request by WordPress
58 characters long description:
A very flexible plugin to manage your FAQ using shortcodes

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
Success! There were no dangerous files found in this plugin353 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code
PHP42416205
CSS25376
JavaScript212672

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.34
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%
Functions9
▷ Named functions9100.00%
▷ Anonymous functions00.00%
Constants6
▷ Global constants6100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
2 PNG files occupy 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/faq-bg.png1.04KB0.15KB▼ 86.07%
images/faq-bg-hover.png0.99KB0.11KB▼ 88.94%