84% smart-faq

Code Review | Smart FAQ

WordPress plugin Smart FAQ scored 84% from 54 tests.

About plugin

  • Plugin page: smart-faq
  • Plugin version: 1.4
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.0
  • WordPress version: 6.3.1
  • First release: Mar 14, 2013
  • Latest release: Sep 16, 2014
  • Number of updates: 30
  • Update frequency: every 18.4 days
  • Top authors: brooksX (100%)

Code review

54 tests

User reviews

9 reviews

Install metrics

300+ active / 10,650 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
This plugin's installer ran successfully

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

An overview of server-side resources used by Smart FAQ
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0642.61 ▲2.47
Dashboard /wp-admin3.37 ▲0.0740.54 ▼5.86
Posts /wp-admin/edit.php3.42 ▲0.0640.34 ▼6.02
Add New Post /wp-admin/post-new.php5.95 ▲0.0777.84 ▼17.64
Media Library /wp-admin/upload.php3.29 ▲0.0630.87 ▼1.85
Smart FAQ Settings /wp-admin/options-general.php?page=smartfaq-admin3.2628.61
FAQ List /wp-admin/edit.php?post_type=smart_faq3.3436.24
Categories /wp-admin/edit-tags.php?taxonomy=category&post_type=smart_faq3.2937.16
Add New FAQ /wp-admin/post-new.php?post_type=smart_faq3.4251.47

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

Filesystem and database footprint
This plugin installed successfully
Filesystem: 16 new files
Database: no new tables, 8 new options
New WordPress options
db_upgraded
widget_recent-posts
widget_theysaidso_widget
widget_recent-comments
category_children
can_compress_scripts
smartfaq_options
theysaidso_admin_options

Browser metrics Passed 4 tests

Checking browser requirements for Smart FAQ
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,946 ▲21113.63 ▼0.825.25 ▲3.6939.64 ▼2.84
Dashboard /wp-admin2,244 ▲535.87 ▼0.06110.56 ▲3.5343.52 ▲4.44
Posts /wp-admin/edit.php2,124 ▲352.06 ▲0.0539.28 ▼0.6933.06 ▲0.10
Add New Post /wp-admin/post-new.php1,543 ▲2417.65 ▼5.49598.34 ▼113.5462.09 ▲7.29
Media Library /wp-admin/upload.php1,423 ▲384.26 ▲0.0394.07 ▼7.8139.71 ▼6.88
Smart FAQ Settings /wp-admin/options-general.php?page=smartfaq-admin8602.0726.5028.32
FAQ List /wp-admin/edit.php?post_type=smart_faq1,1231.9330.7230.65
Categories /wp-admin/edit-tags.php?taxonomy=category&post_type=smart_faq1,4752.1427.4735.63
Add New FAQ /wp-admin/post-new.php?post_type=smart_faq2,4397.65167.8966.19

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
  • The uninstall procedure has failed, leaving 7 options in the database
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • can_compress_scripts
    • db_upgraded
    • widget_recent-posts
    • widget_recent-comments
    • category_children

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
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 fix the following
  • 4× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/smart-faq/1.3/includes/admin.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/smart-faq/1.3/smart-faq.php:16
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/smart-faq/smart-faq.php:16
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/smart-faq/includes/admin.php:2

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 important because it is parsed by WordPress.org for the public listing of your plugin
Attributes that require attention:
  • Donate link: Invalid url: ""
Please take inspiration from this readme.txt

smart-faq/smart-faq.php 92% from 13 tests

The main PHP file in "Smart FAQ" ver. 1.4 adds more information about the plugin and also serves as the entry point for this plugin
Please make the necessary changes and fix the following:
  • Description: Please don't use more than 140 characters for the plugin description (currently 383 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Good job! No executable or dangerous file extensions detected454 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP34140405
CSS10029
JavaScript20020

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.20
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%
Functions36
▷ Named functions36100.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants4100.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
4 PNG files occupy 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/open.png0.23KB0.15KB▼ 33.33%
1.3/images/open.png0.23KB0.15KB▼ 33.33%
images/close.png0.21KB0.13KB▼ 36.92%
1.3/images/close.png0.21KB0.13KB▼ 36.92%