74% recaptcha-by-roger

Code Review | reCaptcha By Roger

WordPress plugin reCaptcha By Roger scored 74% from 54 tests.

About plugin

  • Plugin page: recaptcha-by-roger
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Oct 9, 2020
  • Latest release: Oct 23, 2020
  • Number of updates: 5
  • Update frequency: every 2.8 days
  • Top authors: rogerj2592 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 2,108 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.02MB] [CPU: ▼6.49ms] Passed 4 tests

An overview of server-side resources used by reCaptcha By Roger
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0237.65 ▼5.75
Dashboard /wp-admin3.34 ▲0.0347.40 ▼2.23
Posts /wp-admin/edit.php3.45 ▲0.1045.89 ▼2.01
Add New Post /wp-admin/post-new.php5.92 ▲0.0386.13 ▼15.98
Media Library /wp-admin/upload.php3.24 ▲0.0136.13 ▲2.56
ReCaptcha Logs /wp-admin/admin.php?page=recaptcha-logs3.2439.49
ReCaptcha Keys /wp-admin/admin.php?page=recaptcha-settings3.2437.17

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 74 new files
Database: 1 new table, 6 new options
New tables
wp_roger_recaptcha_logs
New WordPress options
widget_recent-posts
widget_theysaidso_widget
can_compress_scripts
db_upgraded
theysaidso_admin_options
widget_recent-comments

Browser metrics Passed 4 tests

reCaptcha By Roger: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,973 ▲21615.07 ▲0.391.65 ▼0.4439.41 ▼7.19
Dashboard /wp-admin2,379 ▲1886.82 ▲0.92123.67 ▲15.9140.14 ▼6.74
Posts /wp-admin/edit.php2,282 ▲1933.76 ▲1.7648.76 ▲11.8034.28 ▼4.52
Add New Post /wp-admin/post-new.php1,554 ▲1223.69 ▲0.52632.58 ▼22.1037.05 ▼17.32
Media Library /wp-admin/upload.php1,415 ▲304.47 ▲0.2880.50 ▼21.7940.66 ▼2.92
ReCaptcha Logs /wp-admin/admin.php?page=recaptcha-logs1,0923.8959.2628.93
ReCaptcha Keys /wp-admin/admin.php?page=recaptcha-settings1,0353.4141.4623.89

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
These items require your attention
  • Zombie tables were found after uninstall: 1 table
    • wp_roger_recaptcha_logs
  • Zombie WordPress options detected upon uninstall: 6 options
    • db_upgraded
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-posts
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Everything seems fine, however this is by no means an exhaustive test

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
The following issues need your attention
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/recaptcha-by-roger/recaptcha.php:13

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
There were no browser issues found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 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
Please fix the following attributes:
  • Contributors: Plugin contributors field is missing
The official readme.txt is a good inspiration

recaptcha-by-roger/recaptcha.php 92% from 13 tests

The main PHP script in "reCaptcha By Roger" version 1.0 is automatically included on every request by WordPress
You should first fix the following items:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("recaptcha-by-roger.php" instead of "recaptcha.php")

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 plugin25,756 lines of code in 67 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript355,82115,75121,772
CSS26922023,528
PHP35436295
Sass2353160
JSON1001

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.21
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions12
▷ Named functions1191.67%
▷ Anonymous functions18.33%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
5 compressed PNG files occupy 0.00MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
DataTables/DataTables-1.10.21/images/sort_desc_disabled.png0.14KB0.25KB0.00%
DataTables/DataTables-1.10.21/images/sort_asc_disabled.png0.14KB0.25KB0.00%
DataTables/DataTables-1.10.21/images/sort_both.png0.20KB0.29KB0.00%
DataTables/DataTables-1.10.21/images/sort_desc.png0.15KB0.25KB0.00%
DataTables/DataTables-1.10.21/images/sort_asc.png0.16KB0.25KB0.00%