77% recaptcha-for-login-and-registration

Code Review | Recaptcha for Login and registration

WordPress plugin Recaptcha for Login and registration scored77%from 54 tests.

About plugin

  • Plugin page: recaptcha-for-log...
  • Plugin version: 1.0.9
  • PHP version: 7.4.16
  • WordPress compatibility: 4.9-6.3
  • WordPress version: 6.3.1
  • First release: Jan 14, 2020
  • Latest release: Aug 25, 2023
  • Number of updates: 16
  • Update frequency: every 82.4 days
  • Top authors: empoweringprowebsite (100%)

Code review

54 tests

User reviews

1 review

Install metrics

80+ active /1,086 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▲0.03MB] [CPU: ▼5.36ms] Passed 4 tests

Server-side resources used by Recaptcha for Login and registration
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0335.13 ▼5.59
Dashboard /wp-admin3.34 ▲0.0342.75 ▼4.39
Posts /wp-admin/edit.php3.39 ▲0.0348.69 ▲3.42
Add New Post /wp-admin/post-new.php5.94 ▲0.0580.55 ▼9.80
Media Library /wp-admin/upload.php3.26 ▲0.0333.74 ▼1.65
prositecaptcha /wp-admin/options-general.php?page=prositecaptcha3.2632.96

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

A short overview of filesystem and database impact
This plugin was installed successfully
Filesystem: 22 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_theysaidso_widget
can_compress_scripts
widget_recent-comments
db_upgraded
widget_recent-posts

Browser metrics Passed 4 tests

Checking browser requirements for Recaptcha for Login and registration
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,810 ▲5314.48 ▲0.111.71 ▼0.2640.84 ▼3.48
Dashboard /wp-admin2,208 ▲175.84 ▲0.94111.72 ▲5.6739.69 ▼7.21
Posts /wp-admin/edit.php2,097 ▲82.01 ▼0.0138.28 ▲2.5334.81 ▲1.41
Add New Post /wp-admin/post-new.php1,521 ▼2117.71 ▼0.72670.53 ▲31.9665.32 ▲3.45
Media Library /wp-admin/upload.php1,390 ▲84.14 ▼0.0796.37 ▼3.6942.30 ▼2.18
prositecaptcha /wp-admin/options-general.php?page=prositecaptcha8782.0422.3945.55

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
Please fix the following items
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_recent-posts
    • can_compress_scripts
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-comments

Smoke tests 50% from 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 0% 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
  • 1× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/recaptcha-for-login-and-registration/public/partials/prositecaptcha-public-display.php
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html__() in wp-content/plugins/recaptcha-for-login-and-registration/admin/partials/prositecaptcha-admin-display.php:18

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side

Optimizations

Plugin configuration 86% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
Attributes that require attention:
  • Plugin Name: Please specify the plugin name on the first line ( === recaptcha-for-login-and-registration === )
The official readme.txt is a good inspiration

recaptcha-for-login-and-registration/prositecaptcha.php 77% from 13 tests

The entry point to "Recaptcha for Login and registration" version 1.0.9 is a PHP file that has certain tags in its header comment area
Please take the time to fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("recaptcha-for-login-and-registration.php" instead of "prositecaptcha.php")
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6
  • Description: Keep the plugin description shorter than 140 characters (currently 143 characters long)

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
No dangerous file extensions were detected555 lines of code in 16 files:
LanguageFilesBlank linesComment linesLines of code
PHP12166573441
CSS278108
JavaScript24546

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.52
Average class complexity14.71
▷ Minimum class complexity1.00
▷ Maximum class complexity81.00
Average method complexity3.40
▷ Minimum method complexity1.00
▷ Maximum method complexity17.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods40
▷ Static methods25.00%
▷ Public methods3587.50%
▷ Protected methods00.00%
▷ Private methods512.50%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
There are no PNG files in this plugin