68% simple-qa

Code Review | Simple Q&A

WordPress plugin Simple Q&A scored 68% from 54 tests.

About plugin

  • Plugin page: simple-qa
  • Plugin version: 2.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-4.5.3
  • WordPress version: 6.3.1
  • First release: Feb 27, 2016
  • Latest release: Jul 5, 2016
  • Number of updates: 26
  • Update frequency: every 5.0 days
  • Top authors: jon4god (100%)

Code review

54 tests

User reviews

1 review

Install metrics

70+ active / 4,419 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed gracefully, with no errors

Server metrics [RAM: ▼1.23MB] [CPU: ▼40.83ms] Passed 4 tests

An overview of server-side resources used by Simple Q&A
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /2.74 ▼0.7215.25 ▼28.21
Dashboard /wp-admin2.78 ▼0.5215.97 ▼30.19
Posts /wp-admin/edit.php2.78 ▼0.5816.12 ▼31.52
Add New Post /wp-admin/post-new.php2.78 ▼3.1115.86 ▼73.39
Media Library /wp-admin/upload.php2.78 ▼0.4517.66 ▼15.00
Q&A Settings /wp-admin/options-general.php?page=qa-plugin2.7815.16
New Q&A /wp-admin/post-new.php?post_type=qa2.7816.89
Q&A /wp-admin/edit.php?post_type=qa2.7817.21
Q&A Tags /wp-admin/edit-tags.php?taxonomy=qatag&post_type=qa2.7816.50

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 17 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
theysaidso_admin_options
widget_recent-comments
db_upgraded
widget_recent-posts
widget_theysaidso_widget

Browser metrics Passed 4 tests

Simple Q&A: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,884 ▲14913.25 ▼1.124.43 ▲2.7839.50 ▼14.18
Dashboard /wp-admin2,262 ▲834.87 ▼0.95101.28 ▲0.8640.11 ▼2.07
Posts /wp-admin/edit.php2,121 ▲322.03 ▼0.0133.57 ▼7.8333.18 ▼2.33
Add New Post /wp-admin/post-new.php1,562 ▲2922.93 ▼0.24663.93 ▲27.6855.47 ▲5.73
Media Library /wp-admin/upload.php1,426 ▲444.25 ▲0.0694.71 ▼3.7641.36 ▼2.87
Q&A Settings /wp-admin/options-general.php?page=qa-plugin1,5202.5457.4732.05
New Q&A /wp-admin/post-new.php?post_type=qa2,5057.73174.1165.36
Q&A /wp-admin/edit.php?post_type=qa1,1161.9332.1731.70
Q&A Tags /wp-admin/edit-tags.php?taxonomy=qatag&post_type=qa1,2692.1425.5431.74

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
It is recommended to fix the following
  • Uninstall procedure validation failed for this plugin
    • > Warning in wp-content/plugins/simple-qa/qa-plugin.php+64
    A non-numeric value encountered
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-comments
    • widget_recent-posts
    • theysaidso_admin_options
    • db_upgraded

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Smoke test failed, please fix the following
  • 5 occurences, only the last one shown
    • > GET request to /wp-admin/edit-tags.php?taxonomy=qatag&post_type=qa
    • > Warning in wp-content/plugins/simple-qa/qa-plugin.php+64
    A non-numeric value encountered

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please fix the following items
  • 4× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Interface 'ReCaptcha\\RequestMethod' not found in wp-content/plugins/simple-qa/ReCaptcha/RequestMethod/SocketPost.php:37
    • > PHP Fatal error
      Uncaught Error: Interface 'ReCaptcha\\RequestMethod' not found in wp-content/plugins/simple-qa/ReCaptcha/RequestMethod/Post.php:35
    • > PHP Fatal error
      Uncaught Error: Interface 'ReCaptcha\\RequestMethod' not found in wp-content/plugins/simple-qa/ReCaptcha/RequestMethod/CurlPost.php:37
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/simple-qa/qa-plugin.php:19

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine on the user side

Optimizations

Plugin configuration 96% from 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
6 plugin tags: qa, answers, question, question and answer, answer...

simple-qa/qa-plugin.php 92% from 13 tests

Analyzing the main PHP file in "Simple Q&A" version 2.1
You should first fix the following items:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("simple-qa.php" instead of "qa-plugin.php")

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
Good job! No executable or dangerous file extensions detected1,460 lines of code in 14 files:
LanguageFilesBlank linesComment linesLines of code
PHP111264901,139
CSS2530283
JavaScript12038

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.31
Average class complexity3.44
▷ Minimum class complexity1.00
▷ Maximum class complexity6.00
Average method complexity1.96
▷ Minimum method complexity1.00
▷ Maximum method complexity6.00
Code structure
Namespaces2
Interfaces1
Traits0
Classes8
▷ Abstract classes00.00%
▷ Concrete classes8100.00%
▷ Final classes00.00%
Methods24
▷ Static methods14.17%
▷ Public methods24100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions30
▷ Named functions2790.00%
▷ Anonymous functions310.00%
Constants8
▷ Global constants112.50%
▷ Class constants787.50%
▷ Public constants7100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
No PNG files were detected