64% simple-google-recaptcha

Code Review | Simple Google reCAPTCHA

WordPress plugin Simple Google reCAPTCHA scored 64% from 54 tests.

About plugin

  • Plugin page: simple-google-rec...
  • Plugin version: 3.9
  • PHP compatiblity: 7.1+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-5.9
  • WordPress version: 5.9.2
  • First release: Aug 1, 2016
  • Latest release: Jan 30, 2022
  • Number of updates: 135
  • Update frequency: every 14.9 days
  • Top authors: Minor (100%)

Code review

54 tests

User reviews

44 reviews

Install metrics

50,000+ active / 393,889 total downloads

Benchmarks

Plugin footprint 48% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Install script ran successfully

Server metrics [RAM: ▲0.00MB] [CPU: ▼295.01ms] Passed 4 tests

Analyzing server-side resources used by Simple Google reCAPTCHA
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0255.12 ▲3.45
Dashboard /wp-admin3.44 ▲0.0335.55 ▲1.75
Posts /wp-admin/edit.php3.66 ▲0.0346.73 ▲11.40
Add New Post /wp-admin/post-new.php6.94 ▼0.0690.54 ▼1,185.62
Media Library /wp-admin/upload.php3.31 ▲0.0225.69 ▲0.40
Google reCAPTCHA /wp-admin/options-general.php?page=sgr_options3.2823.41

Server storage [IO: ▲0.03MB] [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, no new options

Browser metrics Passed 4 tests

A check of browser resources used by Simple Google reCAPTCHA
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,811 ▲6715.87 ▼0.127.02 ▲1.412.66 ▲0.63
Dashboard /wp-admin2,901 ▲436.12 ▼0.02114.32 ▼16.69155.67 ▼2.39
Posts /wp-admin/edit.php2,700 ▲63.24 ▼0.0062.70 ▼2.75134.19 ▼5.00
Add New Post /wp-admin/post-new.php1,671 ▼4015.67 ▼5.34397.42 ▼32.46154.54 ▼9.46
Media Library /wp-admin/upload.php1,710 ▲125.54 ▲0.04137.41 ▼4.18182.07 ▼7.97
Google reCAPTCHA /wp-admin/options-general.php?page=sgr_options1,0392.5454.35124.51

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
These items require your attention
  • The plugin did not uninstall gracefully
    • > Error in wp-content/plugins/simple-google-recaptcha/entity.php+13
    Cannot declare class SimpleGoogleRecaptchaEntity, because the name is already in use
  • Uninstaller has failed for this plugin, leaving 7 files (0.03MB) in the plugin directory
    • (new file) sgr_hide.css
    • (new file) sgr.js
    • (new file) entity.php
    • (new file) uninstall.php
    • (new file) sgr.css
    • (new file) readme.txt
    • (new file) simple-google-recaptcha.php
  • This plugin does not fully uninstall, leaving 1 option in the database
    • recovery_mode_email_last_sent

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
The smoke test was a success, however most plugin functionality was not tested

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
Almost there! Just fix the following items
  • 2× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/simple-google-recaptcha/uninstall.php
    • > /wp-content/plugins/simple-google-recaptcha/simple-google-recaptcha.php

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser issues were found

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
5 plugin tags: recaptcha, spam, protect, google, invisible

simple-google-recaptcha/simple-google-recaptcha.php Passed 13 tests

The primary PHP file in "Simple Google reCAPTCHA" version 3.9 is used by WordPress to initiate all plugin functionality
104 characters long description:
Simply protect your WordPress against spam comments and brute-force attacks, thanks to Google reCAPTCHA!

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
No dangerous file extensions were detected428 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP3120161378
JavaScript16034
CSS22016

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.30
Average class complexity16.33
▷ Minimum class complexity1.00
▷ Maximum class complexity45.00
Average method complexity2.24
▷ Minimum method complexity1.00
▷ Maximum method complexity10.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods37
▷ Static methods12.70%
▷ Public methods2978.38%
▷ Protected methods00.00%
▷ Private methods821.62%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants17
▷ Global constants00.00%
▷ Class constants17100.00%
▷ Public constants17100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
PNG images were not found in this plugin