10% i-am-human

Code Review | I am Human

WordPress plugin I am Human scored10%from 54 tests.

About plugin

  • Plugin page: i-am-human
  • Plugin version: 1.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.9.1-4.4
  • WordPress version: 6.3.1
  • First release: Jun 11, 2014
  • Latest release: Jan 12, 2016
  • Number of updates: 33
  • Update frequency: every 17.6 days
  • Top authors: rclick (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

10+ active /2,417 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
It is recommended to fix the following installer errors
  • Install procedure validation failed for this plugin
    • > Warning in wp-content/plugins/i-am-human/iamhuman_options.php+417
    Use of undefined constant IAMHUMAN_OPTION_COLOUR_ONE - assumed 'IAMHUMAN_OPTION_COLOUR_ONE' (this will throw an Error in a future version of PHP)

Server metrics [RAM: ▼1.96MB] [CPU: ▼50.26ms] Passed 4 tests

A check of server-side resources used by I am Human
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.03 ▼1.434.71 ▼35.45
Dashboard /wp-admin2.05 ▼1.265.54 ▼44.25
Posts /wp-admin/edit.php2.05 ▼1.315.52 ▼41.03
Add New Post /wp-admin/post-new.php2.05 ▼3.846.00 ▼80.32
Media Library /wp-admin/upload.php2.05 ▼1.185.55 ▼27.84
I am human options /wp-admin/options-general.php?page=i-am-human-options2.056.83

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

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

Browser metrics Passed 4 tests

A check of browser resources used by I am Human
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,950 ▲21514.15 ▼0.237.03 ▲5.2042.19 ▲0.56
Dashboard /wp-admin2,226 ▲385.25 ▼0.57107.28 ▼11.3641.77 ▼5.70
Posts /wp-admin/edit.php2,111 ▲222.34 ▲0.2940.10 ▲2.7633.94 ▼1.87
Add New Post /wp-admin/post-new.php1,538 ▲2423.26 ▲5.72606.27 ▼66.3535.47 ▼19.54
Media Library /wp-admin/upload.php1,408 ▲264.47 ▲0.2895.26 ▼3.8043.97 ▲2.20
I am human options /wp-admin/options-general.php?page=i-am-human-options6,5684.63103.6426.35

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 50% 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
  • Uninstall procedure validation failed for this plugin
    • > Warning in wp-content/plugins/i-am-human/iamhuman_options.php+417
    Use of undefined constant IAMHUMAN_OPTION_COLOUR_ONE - assumed 'IAMHUMAN_OPTION_COLOUR_ONE' (this will throw an Error in a future version of PHP)
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_recent-posts
    • db_upgraded
    • 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 server-side errors were triggered
    • > GET request to /wp-admin/options-general.php?page=i-am-human-options
    • > Warning in wp-content/plugins/i-am-human/iamhuman_options.php+417
    Use of undefined constant IAMHUMAN_OPTION_COLOUR_ONE - assumed 'IAMHUMAN_OPTION_COLOUR_ONE' (this will throw an Error in a future version of PHP)
    • > GET request to /wp-admin/options-general.php?page=i-am-human-options
    • > Warning in wp-content/plugins/i-am-human/iamhuman_options.php+417
    Use of undefined constant IAMHUMAN_OPTION_COLOUR_TWO - assumed 'IAMHUMAN_OPTION_COLOUR_TWO' (this will throw an Error in a future version of PHP)
    • > GET request to /wp-admin/options-general.php?page=i-am-human-options
    • > Warning in wp-content/plugins/i-am-human/iamhuman_options.php+417
    Use of undefined constant IAMHUMAN_OPTION_COLOUR_HOVER - assumed 'IAMHUMAN_OPTION_COLOUR_HOVER' (this will throw an Error in a future version of PHP)
    • > GET request to /wp-admin/options-general.php?page=i-am-human-options
    • > Warning in wp-content/plugins/i-am-human/iamhuman_options.php+417
    Use of undefined constant IAMHUMAN_OPTION_GRID_SIZE - assumed 'IAMHUMAN_OPTION_GRID_SIZE' (this will throw an Error in a future version of PHP)
    • > GET request to /wp-admin/options-general.php?page=i-am-human-options
    • > Warning in wp-content/plugins/i-am-human/iamhuman_options.php+417
    Use of undefined constant IAMHUMAN_OPTION_BACKGROUND_COLOUR - assumed 'IAMHUMAN_OPTION_BACKGROUND_COLOUR' (this will throw an Error in a future version of PHP)
    • > GET request to /wp-admin/options-general.php?page=i-am-human-options
    • > Warning in wp-content/plugins/i-am-human/iamhuman_options.php+417
    Use of undefined constant IAMHUMAN_OPTION_DESCRIPTION_TITLE - assumed 'IAMHUMAN_OPTION_DESCRIPTION_TITLE' (this will throw an Error in a future version of PHP)
    • > GET request to /wp-admin/options-general.php?page=i-am-human-options
    • > Warning in wp-content/plugins/i-am-human/iamhuman_options.php+417
    Use of undefined constant IAMHUMAN_OPTION_DESCRIPTION_TEXT - assumed 'IAMHUMAN_OPTION_DESCRIPTION_TEXT' (this will throw an Error in a future version of PHP)
    • > GET request to /wp-admin/options-general.php?page=i-am-human-options
    • > Warning in wp-content/plugins/i-am-human/iamhuman_options.php+417
    Use of undefined constant IAMHUMAN_OPTION_INCORRECT_ATTEMPT_MESSAGE - assumed 'IAMHUMAN_OPTION_INCORRECT_ATTEMPT_MESSAGE' (this will throw an Error in a future version of PHP)
    • > GET request to /wp-admin/options-general.php?page=i-am-human-options
    • > Warning in wp-content/plugins/i-am-human/iamhuman_options.php+417
    Use of undefined constant IAMHUMAN_OPTION_QUESTION_COLOUR_ONE_STRING - assumed 'IAMHUMAN_OPTION_QUESTION_COLOUR_ONE_STRING' (this will throw an Error in a future version of PHP)
    • > GET request to /wp-admin/options-general.php?page=i-am-human-options
    • > Warning in wp-content/plugins/i-am-human/iamhuman_options.php+417
    Use of undefined constant IAMHUMAN_OPTION_QUESTION_COLOUR_TWO_STRING - assumed 'IAMHUMAN_OPTION_QUESTION_COLOUR_TWO_STRING' (this will throw an Error in a future version of PHP)
    • > GET request to /wp-admin/options-general.php?page=i-am-human-options
    • > Warning in wp-content/plugins/i-am-human/iamhuman_options.php+417
    Use of undefined constant IAMHUMAN_OPTION_ANSWER_COLOUR_ONE_STRING - assumed 'IAMHUMAN_OPTION_ANSWER_COLOUR_ONE_STRING' (this will throw an Error in a future version of PHP)
    • > GET request to /wp-admin/options-general.php?page=i-am-human-options
    • > Warning in wp-content/plugins/i-am-human/iamhuman_options.php+417
    Use of undefined constant IAMHUMAN_OPTION_ANSWER_COLOUR_TWO_STRING - assumed 'IAMHUMAN_OPTION_ANSWER_COLOUR_TWO_STRING' (this will throw an Error in a future version of PHP)
    • > GET request to /wp-admin/options-general.php?page=i-am-human-options
    • > Warning in wp-content/plugins/i-am-human/iamhuman_options.php+417
    Use of undefined constant IAMHUMAN_OPTION_ENABLE_POST_COMMENTS - assumed 'IAMHUMAN_OPTION_ENABLE_POST_COMMENTS' (this will throw an Error in a future version of PHP)

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
The following issues need your attention
  • 2× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/i-am-human/iamhuman_options.php:54
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/i-am-human/iamhuman_options.php:54

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
4 plugin tags: fun, human verification, captcha, spam

i-am-human/iamhuman.php 92% from 13 tests

The primary PHP file in "I am Human" version 1.2 is used by WordPress to initiate all plugin functionality
The following require your attention:
  • Main file name: The principal plugin file should be the same as the plugin slug ("i-am-human.php" instead of "iamhuman.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
There were no executable files found in this plugin678 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP318489528
JavaScript14412117
CSS110433

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.12
Average class complexity1.00
▷ Minimum class complexity1.00
▷ Maximum class complexity1.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions22
▷ Named functions22100.00%
▷ Anonymous functions00.00%
Constants13
▷ Global constants00.00%
▷ Class constants13100.00%
▷ Public constants13100.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
There are no PNG files in this plugin