10% hercules-recaptcha

Code Review | Hercules Recaptcha

WordPress plugin Hercules Recaptcha scored10%from 54 tests.

About plugin

  • Plugin page: hercules-recaptcha
  • Plugin version: 1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.0
  • WordPress version: 6.3.1
  • First release: Jan 11, 2015
  • Latest release: Jan 19, 2015
  • Number of updates: 7
  • Update frequency: every 1.1 days
  • Top authors: toddnestor (100%)

Code review

54 tests

User reviews

5 reviews

Install metrics

10+ active /1,196 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
These installer errors require your attention
  • Install procedure validation failed for this plugin
    • > Notice in wp-content/plugins/hercules-recaptcha/hercules_recaptcha.php+255
    Trying to access array offset on value of type bool

Server metrics [RAM: ▼1.88MB] [CPU: ▼54.59ms] Passed 4 tests

Analyzing server-side resources used by Hercules Recaptcha
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /2.11 ▼1.358.52 ▼32.54
Dashboard /wp-admin2.13 ▼1.186.38 ▼44.08
Posts /wp-admin/edit.php2.13 ▼1.237.08 ▼46.11
Add New Post /wp-admin/post-new.php2.13 ▼3.766.41 ▼95.63
Media Library /wp-admin/upload.php2.13 ▼1.107.08 ▼26.62
Hercules Recaptcha /wp-admin/options-general.php?page=hercules-recaptcha2.137.93

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, 6 new options
New WordPress options
widget_theysaidso_widget
widget_recent-comments
db_upgraded
can_compress_scripts
widget_recent-posts
theysaidso_admin_options

Browser metrics Passed 4 tests

Checking browser requirements for Hercules Recaptcha
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,862 ▲11614.10 ▼0.3012.24 ▲10.5238.45 ▲0.79
Dashboard /wp-admin2,210 ▲195.83 ▼0.0799.38 ▼1.9639.91 ▼5.14
Posts /wp-admin/edit.php2,090 ▼21.99 ▼0.0635.24 ▼25.0429.98 ▼11.15
Add New Post /wp-admin/post-new.php1,517 ▼1317.70 ▼5.60669.16 ▲31.8853.72 ▼1.56
Media Library /wp-admin/upload.php1,392 ▲44.14 ▼0.04104.00 ▲2.6742.39 ▼1.27
Hercules Recaptcha /wp-admin/options-general.php?page=hercules-recaptcha1,0022.0625.0230.59

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
  • Uninstall procedure validation failed for this plugin
    • > Notice in wp-content/plugins/hercules-recaptcha/hercules_recaptcha.php+255
    Trying to access array offset on value of type bool
  • Zombie WordPress options detected upon uninstall: 6 options
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-posts
    • widget_recent-comments
    • widget_theysaidso_widget
    • 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
These server-side errors were triggered
  • 4 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=hercules-recaptcha
    • > Notice in wp-content/plugins/hercules-recaptcha/hercules_recaptcha.php+256
    Trying to access array offset on value of type bool
    • > GET request to /wp-admin/options-general.php?page=hercules-recaptcha
    • > User deprecated in wp-includes/functions.php+5453
    Function get_current_theme is deprecated since version 3.4.0! Use wp_get_theme() instead.

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please fix the following
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/hercules-recaptcha/hercules_recaptcha.php:245

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
There were no browser issues found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
5 plugin tags: comments, hercules, recaptcha, spam, captcha

hercules-recaptcha/hercules_recaptcha.php 92% from 13 tests

The main PHP script in "Hercules Recaptcha" version 1.1 is automatically included on every request by WordPress
Please take the time to fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("hercules-recaptcha.php" instead of "hercules_recaptcha.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
Success! There were no dangerous files found in this plugin332 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP13452332

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.43
Average class complexity34.00
▷ Minimum class complexity34.00
▷ Maximum class complexity34.00
Average method complexity3.36
▷ Minimum method complexity1.00
▷ Maximum method complexity9.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods14
▷ Static methods00.00%
▷ Public methods1392.86%
▷ Protected methods17.14%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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 images were found in this plugin