90% simpleform-recaptcha

Code Review | SimpleForm reCAPTCHA

WordPress plugin SimpleForm reCAPTCHA scored90%from 54 tests.

About plugin

  • Plugin page: simpleform-recaptcha
  • Plugin version: 1.1.2
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.6-5.9
  • WordPress version: 6.3.1
  • First release: Feb 4, 2021
  • Latest release: Apr 20, 2022
  • Number of updates: 5
  • Update frequency: every 88.2 days
  • Top authors: simpleform (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active /630 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Install script ran successfully

Server metrics [RAM: ▲0.23MB] [CPU: ▲0.45ms] Passed 4 tests

Analyzing server-side resources used by SimpleForm reCAPTCHA
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.70 ▲0.2446.35 ▲3.49
Dashboard /wp-admin3.53 ▲0.2351.45 ▲2.23
Posts /wp-admin/edit.php3.65 ▲0.2949.78 ▼3.26
Add New Post /wp-admin/post-new.php6.11 ▲0.2394.11 ▼0.66
Media Library /wp-admin/upload.php3.46 ▲0.2342.34 ▲3.88

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

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 15 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
widget_recent-posts
can_compress_scripts
db_upgraded
widget_recent-comments
theysaidso_admin_options

Browser metrics Passed 4 tests

Checking browser requirements for SimpleForm reCAPTCHA
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5413.31 ▼1.064.45 ▲2.6744.39 ▲5.78
Dashboard /wp-admin2,206 ▲214.85 ▼1.00108.20 ▲1.3142.52 ▼2.47
Posts /wp-admin/edit.php2,089 ▼02.00 ▼0.0339.80 ▼1.1436.44 ▼2.60
Add New Post /wp-admin/post-new.php1,519 ▼2323.27 ▲4.98648.22 ▲33.2760.93 ▲10.83
Media Library /wp-admin/upload.php1,391 ▲34.20 ▲0.0295.09 ▼7.1143.84 ▼0.62

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_recent-comments
    • db_upgraded
    • widget_theysaidso_widget
    • can_compress_scripts

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP Passed 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
Everything seems fine, however this is by no means an exhaustive test

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
10 plugin tags: google, simpleform addon, antispam, contact form, captcha...

simpleform-recaptcha/simpleform-recaptcha.php Passed 13 tests

The main file in "SimpleForm reCAPTCHA" v. 1.1.2 serves as a complement to information provided in readme.txt and as the entry point to the plugin
137 characters long description:
Stop Bot Spam! This SimpleForm addon allows you to require users to confirm that they are not a robot by completing the Google reCAPTCHA.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Success! There were no dangerous files found in this plugin955 lines of code in 10 files:
LanguageFilesBlank linesComment linesLines of code
PHP8327345795
JavaScript2260160

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.59
Average class complexity61.40
▷ Minimum class complexity3.00
▷ Maximum class complexity243.00
Average method complexity8.74
▷ Minimum method complexity1.00
▷ Maximum method complexity57.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes5
▷ Abstract classes00.00%
▷ Concrete classes5100.00%
▷ Final classes00.00%
Methods39
▷ Static methods410.26%
▷ Public methods3384.62%
▷ Protected methods25.13%
▷ Private methods410.26%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants6
▷ Global constants6100.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
PNG images were not found in this plugin