79% question-answer-faq

Code Review | Question answer

WordPress plugin Question answer scored79%from 54 tests.

About plugin

  • Plugin page: question-answer-faq
  • Plugin version: 1.2.3
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-4.9.8
  • WordPress version: 6.3.1
  • First release: Dec 13, 2016
  • Latest release: Oct 13, 2018
  • Number of updates: 30
  • Update frequency: every 22.7 days
  • Top authors: mideal (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

200+ active /4,239 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
Installer ran successfully

Server metrics [RAM: ▼0.64MB] [CPU: ▼18.32ms] Passed 4 tests

Analyzing server-side resources used by Question answer
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0644.86 ▼1.16
Dashboard /wp-admin3.35 ▲0.0548.65 ▼7.37
Posts /wp-admin/edit.php3.40 ▲0.0547.73 ▼5.03
Add New Post /wp-admin/post-new.php3.20 ▼2.6939.95 ▼59.73
Media Library /wp-admin/upload.php3.28 ▲0.0543.96 ▲3.38
Question /wp-admin/edit.php?post_type=mideal_faq3.3236.84
Settings /wp-admin/edit.php?post_type=mideal_faq&page=settings3.3339.07
Add question /wp-admin/post-new.php?post_type=mideal_faq3.1335.14

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

A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 30 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_theysaidso_widget
db_upgraded
widget_recent-comments
theysaidso_admin_options
widget_recent-posts

Browser metrics Passed 4 tests

An overview of browser requirements for Question answer
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,921 ▲16013.91 ▼0.509.77 ▲7.9138.27 ▼8.36
Dashboard /wp-admin2,234 ▲575.73 ▲0.05100.09 ▼0.7242.65 ▼2.96
Posts /wp-admin/edit.php2,139 ▲392.08 ▲0.0639.04 ▼0.1840.29 ▲3.85
Add New Post /wp-admin/post-new.php1,560 ▲2623.27 ▲0.08737.17 ▲66.2156.77 ▲6.13
Media Library /wp-admin/upload.php1,439 ▲424.21 ▼0.04133.05 ▲23.8155.99 ▲6.59
Question /wp-admin/edit.php?post_type=mideal_faq1,1282.0032.6626.71
Settings /wp-admin/edit.php?post_type=mideal_faq&page=settings1,3712.5441.8126.75
Add question /wp-admin/post-new.php?post_type=mideal_faq2,5488.99204.8174.99

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
The following items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-comments
    • db_upgraded
    • widget_recent-posts
    • can_compress_scripts

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
These errors were triggered by the plugin
    • > GET request to /wp-admin/post-new.php?post_type=mideal_faq
    • > Notice in wp-content/plugins/question-answer-faq/includes/admin/admin.php+94
    Undefined index: mideal_faq_noncename

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Almost there! Just fix the following items
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/question-answer-faq/templates/admin.php:4

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There were no browser issues found

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
3 plugin tags: faq, question, answer

question-answer-faq/question-answer-faq.php Passed 13 tests

This is the main PHP file of "Question answer" version 1.2.3, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
101 characters long description:
Question answer, ajax, bootstrap plugin with gravatar avatar and Google reCaptcha 2. Looks like chat.

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
Success! There were no dangerous files found in this plugin2,797 lines of code in 20 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript4991111,342
PHP816090722
CSS74919622
PO File15368111

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.28
Average class complexity4.25
▷ Minimum class complexity1.00
▷ Maximum class complexity14.00
Average method complexity1.72
▷ Minimum method complexity1.00
▷ Maximum method complexity7.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes125.00%
Methods18
▷ Static methods211.11%
▷ Public methods1477.78%
▷ Protected methods00.00%
▷ Private methods422.22%
Functions14
▷ Named functions14100.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants4100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
6 compressed PNG files occupy 0.01MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/bootstrap-colorpicker-master/img/bootstrap-colorpicker/alpha.png0.48KB1.68KB0.00%
assets/bootstrap-colorpicker-master/img/bootstrap-colorpicker/saturation.png4.05KB5.13KB0.00%
img/avatar-default.png2.26KB2.30KB0.00%
assets/bootstrap-colorpicker-master/img/bootstrap-colorpicker/alpha-horizontal.png0.54KB1.62KB0.00%
assets/bootstrap-colorpicker-master/img/bootstrap-colorpicker/hue-horizontal.png0.47KB0.47KB0.00%