10% wp-responsive-faqs

Code Review | WP Responsive FAQ

WordPress plugin WP Responsive FAQ scored10%from 54 tests.

About plugin

  • Plugin page: wp-responsive-faqs
  • Plugin version: 1.3
  • PHP version: 7.4.16
  • WordPress compatibility: 3.8-4.0.1
  • WordPress version: 6.3.1
  • First release: Nov 14, 2014
  • Latest release: Dec 9, 2014
  • Number of updates: 78
  • Update frequency: every 0.3 days
  • Top authors: pkdq (100%)

Code review

54 tests

User reviews

7 reviews

Install metrics

20+ active /5,168 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
These installer errors require your attention
  • Install procedure had errors
    • > Notice in wp-content/plugins/wp-responsive-faqs/index.php+73
    Trying to get property 'num_rows' of non-object

Server metrics [RAM: ▲0.02MB] [CPU: ▼2.80ms] Passed 4 tests

Analyzing server-side resources used by WP Responsive FAQ
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0241.51 ▲1.45
Dashboard /wp-admin3.32 ▲0.0248.91 ▼6.57
Posts /wp-admin/edit.php3.37 ▲0.0245.86 ▼5.13
Add New Post /wp-admin/post-new.php5.90 ▲0.0299.12 ▲0.68
Media Library /wp-admin/upload.php3.24 ▲0.0236.18 ▼0.19

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

A short overview of filesystem and database impact
The plugin installed successfully
Filesystem: 17 new files
Database: 3 new tables, 7 new options
New tables
wp_ajax_faq_cat
wp_ajax_faq_categories
wp_ajax_faq
New WordPress options
theysaidso_admin_options
db_upgraded
widget_theysaidso_widget
can_compress_scripts
wp_ajax_faq_count
widget_recent-comments
widget_recent-posts

Browser metrics Passed 4 tests

This is an overview of browser requirements for WP Responsive FAQ
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,000 ▲25414.16 ▼0.051.83 ▼0.0743.56 ▼1.29
Dashboard /wp-admin2,406 ▲2186.25 ▲0.41117.34 ▲13.6541.09 ▼3.70
Posts /wp-admin/edit.php2,249 ▲1603.04 ▲1.0648.36 ▲7.6138.37 ▼0.11
Add New Post /wp-admin/post-new.php1,549 ▲1623.73 ▲0.33679.81 ▲40.5438.53 ▼20.38
Media Library /wp-admin/upload.php1,588 ▲2005.63 ▲1.43113.31 ▲13.8845.22 ▼0.68

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • The plugin did not uninstall successfully, leaving 3 tables in the database
    • wp_ajax_faq_cat
    • wp_ajax_faq_categories
    • wp_ajax_faq
  • This plugin does not fully uninstall, leaving 7 options in the database
    • widget_theysaidso_widget
    • widget_recent-comments
    • widget_recent-posts
    • can_compress_scripts
    • db_upgraded
    • wp_ajax_faq_count
    • theysaidso_admin_options

Smoke tests 50% 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 no errors were found, this is by no means an exhaustive test

SRP 0% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
The following issues need your attention
  • 1× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/wp-responsive-faqs/index.php
  • 3× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wp-responsive-faqs/src/admin_menu.php:5
    • > PHP Notice
      Undefined index: list in wp-content/plugins/wp-responsive-faqs/src/ajax/arrange.php on line 2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/wp-responsive-faqs/src/shortcode.php:138

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser errors were detected

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
These attributes need your attention:
  • Screenshots: Screenshot #9 (WP Responsive FAQ - FAQ List Filtered) image missing
Please take inspiration from this readme.txt

wp-responsive-faqs/index.php 92% from 13 tests

"WP Responsive FAQ" version 1.3's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
It is important to fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("wp-responsive-faqs.php" instead of "index.php")

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
No dangerous file extensions were detected1,459 lines of code in 15 files:
LanguageFilesBlank linesComment linesLines of code
PHP511755708
CSS3248386
JavaScript79656365

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.26
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%
Functions16
▷ Named functions1593.75%
▷ Anonymous functions16.25%
Constants5
▷ Global constants5100.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
There were not PNG files found in your plugin