10% superior-faq

Code Review | Superior FAQ

WordPress plugin Superior FAQ scored 10% from 54 tests.

About plugin

  • Plugin page: superior-faq
  • Plugin version: 1.0.2
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-4.8
  • WordPress version: 5.9.2
  • First release: Jun 7, 2018
  • Latest release: Jun 7, 2018
  • Number of updates: 6
  • Update frequency: every 0.2 days
  • Top authors: webradykal (100%)

Code review

54 tests

User reviews

1 review

Install metrics

200+ active / 730 total downloads

Benchmarks

Plugin footprint 58% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The following installer errors require your attention
  • The plugin did not install without errors
    • > Notice in wp-content/plugins/superior-faq/superior-faq.php+885
    Undefined property: Superior_FAQ::$version_field_name

Server metrics [RAM: ▲0.11MB] [CPU: ▼324.36ms] Passed 4 tests

An overview of server-side resources used by Superior FAQ
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.72 ▲0.2053.14 ▼5.15
Dashboard /wp-admin3.55 ▲0.1434.34 ▼1.29
Posts /wp-admin/edit.php3.78 ▲0.1347.40 ▲9.21
Add New Post /wp-admin/post-new.php7.02 ▲0.0498.11 ▼1,285.31
Media Library /wp-admin/upload.php3.43 ▲0.1324.10 ▼5.70
Shortcode Builder /wp-admin/edit.php?post_type=faq&page=sf-shortcode-builder3.4726.15
All FAQs /wp-admin/edit.php?post_type=faq3.5327.38
Add New /wp-admin/post-new.php?post_type=faq3.8145.97
Categories /wp-admin/edit-tags.php?taxonomy=faq_category&post_type=faq3.4425.96
Settings /wp-admin/edit.php?post_type=faq&page=sf-settings3.6428.75

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

Filesystem and database footprint
This plugin was installed successfully
Filesystem: 11 new files
Database: no new tables, 1 new option
New WordPress options
superior_faq_settings

Browser metrics Passed 4 tests

Superior FAQ: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,962 ▲24016.54 ▲0.508.75 ▲1.9729.74 ▲27.37
Dashboard /wp-admin2,935 ▲816.01 ▼0.24122.28 ▼12.21154.96 ▼11.92
Posts /wp-admin/edit.php2,740 ▲493.23 ▼0.0061.12 ▼2.26173.10 ▲19.53
Add New Post /wp-admin/post-new.php1,693 ▲10416.05 ▼1.70416.58 ▼69.83184.92 ▼4.05
Media Library /wp-admin/upload.php1,742 ▲445.56 ▲0.03162.22 ▲22.30237.55 ▲44.48
Shortcode Builder /wp-admin/edit.php?post_type=faq&page=sf-shortcode-builder1,7153.0168.23147.07
All FAQs /wp-admin/edit.php?post_type=faq1,4523.1759.99116.41
Add New /wp-admin/post-new.php?post_type=faq3,49510.19208.74210.27
Categories /wp-admin/edit-tags.php?taxonomy=faq_category&post_type=faq1,6742.7655.96111.62
Settings /wp-admin/edit.php?post_type=faq&page=sf-settings1,2552.6660.22126.54

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
It is recommended to fix the following
  • This plugin did not uninstall successfully, leaving 1 option in the database
    • superior_faq_settings

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
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
  • 3× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/superior-faq/superior-faq.php:33
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/superior-faq/admin/shortcode-builder.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/superior-faq/admin/settings.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)
No browser issues were found

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 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
10 plugin tags: dee-linking, search, permalink, accordion, voting...

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

"Superior FAQ" version 1.0.2's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
73 characters long description:
Create your own FAQs easily and place them anywhere in your post or page.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
No dangerous file extensions were detected1,867 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code
PHP328848927
CSS35931575
JavaScript2134147365

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.20
Average class complexity58.00
▷ Minimum class complexity58.00
▷ Maximum class complexity58.00
Average method complexity3.71
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods21
▷ Static methods00.00%
▷ Public methods1885.71%
▷ Protected methods00.00%
▷ Private methods314.29%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants00.00%
▷ Class constants2100.00%
▷ Public constants2100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
2 compressed PNG files occupy 0.00MB
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
admin/css/chosen-sprite.png0.63KB0.88KB0.00%
admin/css/chosen-sprite@2x.png0.85KB0.83KB▼ 3.10%