79% wp-display-faq

Code Review | WordPress FAQ Accordion Plugin - Display FAQ

WordPress plugin WordPress FAQ Accordion Plugin - Display FAQ scored79%from 54 tests.

About plugin

  • Plugin page: wp-display-faq
  • Plugin version: 1.4.3
  • PHP compatiblity: 7.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.2-6.2.2
  • WordPress version: 6.3.1
  • First release: Jun 10, 2020
  • Latest release: Jul 14, 2023
  • Number of updates: 53
  • Update frequency: every 21.3 days
  • Top authors: mhmrajib (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /863 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▲5.03MB] [CPU: ▲23.50ms] 75% from 4 tests

Server-side resources used by WordPress FAQ Accordion Plugin - Display FAQ
Please take the time to fix the following items
  • Extra RAM: The extra memory usage must be under 5MB (currently 5.03MB on /wp-admin/admin.php?page=freemius)
PageMemory (MB)CPU Time (ms)
Home /8.89 ▲5.4365.30 ▲24.22
Dashboard /wp-admin8.91 ▲5.6076.70 ▲23.53
Posts /wp-admin/edit.php8.91 ▲5.5579.10 ▲35.72
Add New Post /wp-admin/post-new.php9.41 ▲3.52109.11 ▲15.37
Media Library /wp-admin/upload.php8.91 ▲5.6867.94 ▲30.89
Freemius Debug [v.2.5.10] /wp-admin/admin.php?page=freemius8.9158.92

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

Filesystem and database footprint
The plugin installed successfully
Filesystem: 229 new files
Database: no new tables, 9 new options
New WordPress options
theysaidso_admin_options
db_upgraded
widget_recent-comments
fs_active_plugins
can_compress_scripts
widget_recent-posts
widget_theysaidso_widget
fs_debug_mode
fs_accounts

Browser metrics Passed 4 tests

A check of browser resources used by WordPress FAQ Accordion Plugin - Display FAQ
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,978 ▲24314.01 ▼0.415.03 ▲3.3727.37 ▼21.73
Dashboard /wp-admin2,271 ▲835.26 ▲0.17107.34 ▼7.9445.46 ▲1.78
Posts /wp-admin/edit.php2,153 ▲672.46 ▲0.4739.28 ▲4.2941.13 ▲7.77
Add New Post /wp-admin/post-new.php1,554 ▲1623.25 ▲0.21654.54 ▼21.8135.16 ▼20.81
Media Library /wp-admin/upload.php1,453 ▲654.64 ▲0.41100.57 ▼2.9243.96 ▼2.13
Freemius Debug [v.2.5.10] /wp-admin/admin.php?page=freemius1,1202.2128.8026.14

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
You still need to fix the following
  • The plugin did not uninstall gracefully
    • > Notice in wp-content/plugins/wp-display-faq/freemius/includes/class-freemius.php+8486
    Undefined property: stdClass::$plugins
  • Zombie WordPress options were found after uninstall: 9 options
    • fs_accounts
    • db_upgraded
    • can_compress_scripts
    • fs_debug_mode
    • widget_recent-comments
    • theysaidso_admin_options
    • fs_active_plugins
    • widget_recent-posts
    • widget_theysaidso_widget

Smoke tests Passed 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 Passed 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
Congratulations! This plugin passed the SRP test

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 Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
4 plugin tags: accordion, faqs, faq, accordions

wp-display-faq/wp-display-faq.php Passed 13 tests

The primary PHP file in "WordPress FAQ Accordion Plugin - Display FAQ" version 1.4.3 is used by WordPress to initiate all plugin functionality
82 characters long description:
Accordion FAQs Plugin for WordPress to display FAQs with Category in your website.

Code Analysis 97% from 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
Everything looks great! No dangerous files found in this plugin35,569 lines of code in 159 files:
LanguageFilesBlank linesComment linesLines of code
PHP1358,16217,25734,680
CSS177733393
JavaScript64879248
PO File1114121248

PHP code 50% from 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
These items need your attention
  • Class cyclomatic complexity has to be reduced to less than 1000 (currently 3,073)
Cyclomatic complexity
Average complexity per logical line of code0.62
Average class complexity82.24
▷ Minimum class complexity1.00
▷ Maximum class complexity3,073.00
Average method complexity4.52
▷ Minimum method complexity1.00
▷ Maximum method complexity94.00
Code structure
Namespaces0
Interfaces0
Traits3
Classes52
▷ Abstract classes23.85%
▷ Concrete classes5096.15%
▷ Final classes00.00%
Methods1,297
▷ Static methods19715.19%
▷ Public methods89769.16%
▷ Protected methods251.93%
▷ Private methods37528.91%
Functions103
▷ Named functions103100.00%
▷ Anonymous functions00.00%
Constants152
▷ Global constants10569.08%
▷ Class constants4730.92%
▷ Public constants47100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
2 PNG files occupy 0.02MB with 0.01MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
freemius/assets/img/plugin-icon.png9.16KB5.26KB▼ 42.58%
freemius/assets/img/theme-icon.png10.97KB5.78KB▼ 47.37%