84% wp-spam-question-filter

Code Review | WP Spam Question Filter

WordPress plugin WP Spam Question Filter scored 84% from 54 tests.

About plugin

  • Plugin page: wp-spam-question-...
  • Plugin version: 1.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.9.1-4.8.3
  • WordPress version: 5.8.1
  • First release: Jun 4, 2014
  • Latest release: Jul 28, 2020
  • Number of updates: 19
  • Update frequency: every 118.2 days
  • Top authors: ottok (47.37%)Zuige (42.11%)seravo (10.53%)deployer (10.53%)onnimonni (10.53%)

Code review

54 tests

User reviews

4 reviews

Install metrics

80+ active / 2,161 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
Installer ran successfully

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

An overview of server-side resources used by WP Spam Question Filter
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /2.90 ▲0.1835.70 ▲12.11
Dashboard /wp-admin3.12 ▲0.0734.47 ▼7.84
Posts /wp-admin/edit.php3.17 ▲0.0739.37 ▲0.09
Add New Post /wp-admin/post-new.php5.48 ▲0.0591.13 ▼559.59
Media Library /wp-admin/upload.php3.07 ▲0.0635.33 ▲4.64
Spam Question Filter /wp-admin/options-general.php?page=wp_spam_question_filter_page3.0430.33

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

A short overview of filesystem and database impact
The plugin installed successfully
Filesystem: 7 new files
Database: no new tables, 6 new options
New WordPress options
wp_spam_question_filter_prefix
wp_spam_question_filter_questions
wp_spam_question_filter_enable
wp_spam_question_filter_registration
wp_spam_question_filter_db_version
wp_spam_question_filter_answers

Browser metrics Passed 4 tests

An overview of browser requirements for WP Spam Question Filter
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,788 ▲19216.28 ▲0.6412.62 ▲2.1150.13 ▲3.82
Dashboard /wp-admin2,978 ▲475.92 ▼0.25137.59 ▼8.31114.45 ▼4.27
Posts /wp-admin/edit.php2,744 ▲52.71 ▼0.0164.91 ▼0.6787.38 ▼4.70
Add New Post /wp-admin/post-new.php2,060 ▲38819.41 ▲0.62381.34 ▲24.10110.19 ▲0.21
Media Library /wp-admin/upload.php1,812 ▲55.05 ▲0.00147.76 ▲3.33125.77 ▲5.43
Spam Question Filter /wp-admin/options-general.php?page=wp_spam_question_filter_page1,2662.0850.5971.41

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
You still need to fix the following
  • Zombie WordPress options detected upon uninstall: 1 option
    • wp_spam_question_filter_prefix

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Good news, no errors were detected

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
Please fix the following
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/wp-spam-question-filter/wp-spam-question-filter.php:45

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
5 plugin tags: seravo, question, spam, honeypot, filter

wp-spam-question-filter/wp-spam-question-filter.php 85% from 13 tests

The main PHP file in "WP Spam Question Filter" ver. 1.0.1 adds more information about the plugin and also serves as the entry point for this plugin
The following require your attention:
  • Description: Keep the plugin description shorter than 140 characters (currently 141 characters long)
  • Text Domain: The text domain name should consist of only dashes and lowercase characters

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
There were no executable files found in this plugin324 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP16355257
PO File1192152
YAML14112
Markdown1103

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.37
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 functions13100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.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
No PNG files were detected