78% question-antispam-for-comment-and-signup

Code Review | Question Antispam for Comment and Signup

WordPress plugin Question Antispam for Comment and Signup scored78%from 54 tests.

About plugin

  • Plugin page: question-antispam...
  • Plugin version: 0.1.5
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4.1-5.1.1
  • WordPress version: 6.3.1
  • First release: Jul 10, 2014
  • Latest release: May 22, 2019
  • Number of updates: 15
  • Update frequency: every 118.4 days
  • Top authors: qdinar (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active /1,438 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▲0.06MB] [CPU: ▼4.61ms] Passed 4 tests

An overview of server-side resources used by Question Antispam for Comment and Signup
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0634.51 ▼2.51
Dashboard /wp-admin3.36 ▲0.0645.43 ▼4.38
Posts /wp-admin/edit.php3.41 ▲0.0643.79 ▼6.18
Add New Post /wp-admin/post-new.php5.94 ▲0.0682.25 ▼5.38
Media Library /wp-admin/upload.php3.28 ▲0.0535.59 ▲1.46
Question Antispam /wp-admin/options-general.php?page=wpmsqas_config3.2330.05

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

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 2 new files
Database: no new tables, 7 new options
New WordPress options
can_compress_scripts
question_antispam_plugin
widget_recent-posts
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-comments
db_upgraded

Browser metrics Passed 4 tests

An overview of browser requirements for Question Antispam for Comment and Signup
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,793 ▲3214.35 ▲0.061.59 ▼0.1245.31 ▼2.94
Dashboard /wp-admin2,202 ▲255.58 ▼0.0980.78 ▼3.5537.95 ▼2.13
Posts /wp-admin/edit.php2,104 ▲71.98 ▲0.0332.40 ▼7.9431.62 ▼2.97
Add New Post /wp-admin/post-new.php1,529 ▲124.00 ▲0.79658.61 ▲27.3449.60 ▲2.40
Media Library /wp-admin/upload.php1,401 ▲14.14 ▼0.1693.69 ▼1.6041.30 ▲1.06
Question Antispam /wp-admin/options-general.php?page=wpmsqas_config8601.9921.8525.35

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
The following items require your attention
  • Zombie WordPress options were found after uninstall: 7 options
    • question_antispam_plugin
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_recent-posts
    • db_upgraded
    • widget_theysaidso_widget
    • can_compress_scripts

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Almost there, just fix the following server-side errors
    • > GET request to /wp-admin/options-general.php?page=wpmsqas_config
    • > Notice in wp-content/plugins/question-antispam-for-comment-and-signup/question-antispam-for-comment-and-signup.php+56
    Undefined index: comments-spam
    • > GET request to /wp-admin/options-general.php?page=wpmsqas_config
    • > Notice in wp-content/plugins/question-antispam-for-comment-and-signup/question-antispam-for-comment-and-signup.php+57
    Undefined index: comments-ham
    • > GET request to /wp-admin/options-general.php?page=wpmsqas_config
    • > Notice in wp-content/plugins/question-antispam-for-comment-and-signup/question-antispam-for-comment-and-signup.php+58
    Undefined index: signups-spam
    • > GET request to /wp-admin/options-general.php?page=wpmsqas_config
    • > Notice in wp-content/plugins/question-antispam-for-comment-and-signup/question-antispam-for-comment-and-signup.php+59
    Undefined index: signups-ham
    • > GET request to /wp-admin/options-general.php?page=wpmsqas_config
    • > Notice in wp-content/plugins/question-antispam-for-comment-and-signup/question-antispam-for-comment-and-signup.php+74
    Undefined index: count
    • > GET request to /wp-admin/options-general.php?page=wpmsqas_config
    • > Notice in wp-content/plugins/question-antispam-for-comment-and-signup/question-antispam-for-comment-and-signup.php+162
    Undefined index: wpmsqas-submit

SRP 50% 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 take a closer look at the following
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/question-antispam-for-comment-and-signup/question-antispam-for-comment-and-signup.php:86

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 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
Attributes that require attention:
  • Plugin Name: You should set the name of your plugin on the first line ( === question-antispam-for-comment-and-signup === )
Please take inspiration from this readme.txt

question-antispam-for-comment-and-signup/question-antispam-for-comment-and-signup.php Passed 13 tests

The main PHP script in "Question Antispam for Comment and Signup" version 0.1.5 is automatically included on every request by WordPress
112 characters long description:
Question and answer as antispam in signup and comment forms of Wordpress, set by admin, supports Multisite mode.

Code Analysis Passed 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
Success! There were no dangerous files found in this plugin255 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP181133255

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.32
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%
Functions13
▷ Named functions1292.31%
▷ Anonymous functions17.69%
Constants0
▷ Global constants00.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
No PNG files were detected