79% faqs

Code Review | FAQs

WordPress plugin FAQs scored79%from 54 tests.

About plugin

  • Plugin page: faqs
  • Plugin version: 1.0.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5.2-4.9.8
  • WordPress version: 6.3.1
  • First release: Jun 20, 2015
  • Latest release: Oct 12, 2018
  • Number of updates: 4
  • Update frequency: every 340.0 days
  • Top authors: think201 (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

60+ active /1,837 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
This plugin's installer ran successfully

Server metrics [RAM: ▲0.17MB] [CPU: ▼11.63ms] Passed 4 tests

Analyzing server-side resources used by FAQs
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.61 ▲0.1536.48 ▼4.48
Dashboard /wp-admin3.54 ▲0.1945.80 ▼23.97
Posts /wp-admin/edit.php3.59 ▲0.2345.07 ▲1.72
Add New Post /wp-admin/post-new.php6.06 ▲0.1789.80 ▼19.80
Media Library /wp-admin/upload.php3.40 ▲0.1737.02 ▲1.88
Categories /wp-admin/admin.php?page=faqs-categories3.4036.87
Edit FAQs /wp-admin/admin.php?page=faqs-edit-faq3.3934.45
Create Faqs /wp-admin/admin.php?page=faqs-create-faqs3.4039.51
Add Question /wp-admin/admin.php?page=faqs-add-question3.3935.21
Edit Question /wp-admin/admin.php?page=faqs-edit-question3.4033.26
View FAQs /wp-admin/admin.php?page=faqs-view-faqs3.3934.38
Dashboard /wp-admin/admin.php?page=faqs3.4038.13
All FAQs /wp-admin/admin.php?page=faqs-all-faqs3.4038.76

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

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 34 new files
Database: 3 new tables, 6 new options
New tables
wp_faqs_details
wp_faqs_categories
wp_faqs_questions
New WordPress options
widget_recent-comments
db_upgraded
widget_recent-posts
widget_theysaidso_widget
can_compress_scripts
theysaidso_admin_options

Browser metrics Passed 4 tests

This is an overview of browser requirements for FAQs
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,932 ▲18614.77 ▲0.745.83 ▲3.9542.19 ▲5.35
Dashboard /wp-admin2,226 ▲495.62 ▲0.0383.25 ▼10.8637.14 ▼4.20
Posts /wp-admin/edit.php2,131 ▲342.04 ▲0.0639.97 ▲3.3735.95 ▲0.27
Add New Post /wp-admin/post-new.php1,550 ▲2422.51 ▼0.43624.33 ▼95.6061.04 ▼0.37
Media Library /wp-admin/upload.php1,422 ▲284.15 ▼0.0599.05 ▼1.0842.48 ▲0.78
Categories /wp-admin/admin.php?page=faqs-categories1,0513.0040.3924.52
Edit FAQs /wp-admin/admin.php?page=faqs-edit-faq6961.689.4712.52
Create Faqs /wp-admin/admin.php?page=faqs-create-faqs1,0553.0247.8229.51
Add Question /wp-admin/admin.php?page=faqs-add-question6961.8011.7520.68
Edit Question /wp-admin/admin.php?page=faqs-edit-question6961.6811.1714.52
View FAQs /wp-admin/admin.php?page=faqs-view-faqs6961.6810.5618.89
Dashboard /wp-admin/admin.php?page=faqs1,0112.9846.1729.96
All FAQs /wp-admin/admin.php?page=faqs-all-faqs1,1593.0850.7928.63

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
You still need to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • theysaidso_admin_options
    • widget_recent-comments
    • db_upgraded
    • widget_recent-posts
    • widget_theysaidso_widget
    • can_compress_scripts

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
The smoke test was a success, however most plugin functionality was not tested

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
Please fix the following
  • 6× PHP files output text when accessed directly:
    • > /wp-content/plugins/faqs/pages/admin-view-faqs.php
    • > /wp-content/plugins/faqs/pages/admin-edit-faq.php
    • > /wp-content/plugins/faqs/pages/admin-categories.php
    • > /wp-content/plugins/faqs/pages/admin-settings.php
    • > /wp-content/plugins/faqs/pages/admin-add-question.php
    • > /wp-content/plugins/faqs/pages/admin-edit-question.php
  • 11× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function admin_url() in wp-content/plugins/faqs/pages/admin-dashboard.php:4
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/faqs/includes/faqs-listtable.php on line 6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function faqs\\add_action() in wp-content/plugins/faqs/includes/post-requests.php:8
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/faqs/includes/faqs-question-listtable.php on line 6
    • > PHP Fatal error
      Uncaught Error: Class 'faqs\\FAQsListTable' not found in wp-content/plugins/faqs/pages/admin-all-faqs.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function admin_url() in wp-content/plugins/faqs/pages/admin-create-faqs.php:4
    • > PHP Warning
      require_once(ABSPATHwp-admin/includes/class-wp-list-table.php): failed to open stream: No such file or directory in wp-content/plugins/faqs/includes/faqs-question-listtable.php on line 6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/faqs/faqs.php:47
    • > PHP Fatal error
      require_once(): Failed opening required 'ABSPATHwp-admin/includes/class-wp-list-table.php' (include_path='.:/usr/share/php') in wp-content/plugins/faqs/includes/faqs-listtable.php on line 6
    • > PHP Fatal error
      require_once(): Failed opening required 'ABSPATHwp-admin/includes/class-wp-list-table.php' (include_path='.:/usr/share/php') in wp-content/plugins/faqs/includes/faqs-question-listtable.php on line 6

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser errors were detected

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
5 plugin tags: add, print, list, featured, clients

faqs/faqs.php Passed 13 tests

The main PHP script in "FAQs" version 1.0.2 is automatically included on every request by WordPress
58 characters long description:
FAQs (faqs) helps you create FAQs section for your website

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Success! There were no dangerous files found in this plugin1,804 lines of code in 31 files:
LanguageFilesBlank linesComment linesLines of code
PHP192931271,309
Sass3440207
CSS250158
JavaScript7316130

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of 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.18
Average class complexity5.86
▷ Minimum class complexity1.00
▷ Maximum class complexity15.00
Average method complexity1.51
▷ Minimum method complexity1.00
▷ Maximum method complexity6.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods67
▷ Static methods2232.84%
▷ Public methods6597.01%
▷ Protected methods00.00%
▷ Private methods22.99%
Functions13
▷ Named functions13100.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 compressed PNG files occupy 0.00MB
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/img/arrow-down.png0.29KB0.28KB▼ 4.71%
assets/img/arrow-right.png0.30KB0.26KB▼ 15.43%