84% f13-recaptcha

Code Review | F13 reCaptcha

WordPress plugin F13 reCaptcha scored 84% from 54 tests.

About plugin

  • Plugin page: f13-recaptcha
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-5.8.1
  • WordPress version: 6.3.1
  • First release: Oct 30, 2021
  • Latest release: Oct 30, 2021
  • Number of updates: 2
  • Update frequency: every 0.5 days
  • Top authors: f13dev (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 275 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Install script ran successfully

Server metrics [RAM: ▲0.06MB] [CPU: ▼10.23ms] Passed 4 tests

Server-side resources used by F13 reCaptcha
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0637.57 ▼3.18
Dashboard /wp-admin3.36 ▲0.0645.05 ▼4.93
Posts /wp-admin/edit.php3.47 ▲0.1247.90 ▼3.69
Add New Post /wp-admin/post-new.php5.94 ▲0.0679.64 ▼29.12
Media Library /wp-admin/upload.php3.28 ▲0.0636.42 ▲1.45
Google reCaptcha /wp-admin/admin.php?page=f13-google-recaptcha3.2829.06
Plugins /wp-admin/admin.php?page=f13-settings3.32462.40

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

Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 7 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
can_compress_scripts
widget_recent-comments
db_upgraded
widget_recent-posts
theysaidso_admin_options

Browser metrics Passed 4 tests

F13 reCaptcha: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,931 ▲19613.94 ▼0.445.05 ▲3.4640.28 ▼0.88
Dashboard /wp-admin2,229 ▲384.86 ▼1.04109.82 ▲10.0442.35 ▼2.96
Posts /wp-admin/edit.php2,112 ▲202.02 ▼0.0339.71 ▼1.2736.08 ▼2.54
Add New Post /wp-admin/post-new.php1,556 ▲2818.45 ▲0.25655.53 ▲46.9847.64 ▲0.39
Media Library /wp-admin/upload.php1,405 ▲174.22 ▼0.0199.92 ▼3.6942.22 ▼1.39
Google reCaptcha /wp-admin/admin.php?page=f13-google-recaptcha8792.0226.2030.31
Plugins /wp-admin/admin.php?page=f13-settings9242.0223.7728.26

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
  • Zombie WordPress options were found after uninstall: 6 options
    • db_upgraded
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-comments
    • widget_recent-posts
    • theysaidso_admin_options

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
Please fix the following items
  • 3× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/f13-recaptcha/f13-recaptcha.php on line 15
    • > PHP Fatal error
      require_once(): Failed opening required 'ABSPATHwp-admin/includes/plugin.php' (include_path='.:/usr/share/php') in wp-content/plugins/f13-recaptcha/f13-recaptcha.php on line 15
    • > PHP Warning
      require_once(ABSPATHwp-admin/includes/plugin.php): failed to open stream: No such file or directory in wp-content/plugins/f13-recaptcha/f13-recaptcha.php on line 15

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Everything seems fine on the user side

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
Attributes that require attention:
  • Plugin Name: Write the name of your plugin instead of "Plugin Name" on the first line ( === f13-recaptcha === )
You can take inspiration from this readme.txt

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

The primary PHP file in "F13 reCaptcha" version 1.0.0 is used by WordPress to initiate all plugin functionality
36 characters long description:
Add reCaptcha to your wordpress site

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
Good job! No executable or dangerous file extensions detected299 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP4539285
CSS1007
JavaScript1317

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.17
Average class complexity6.50
▷ Minimum class complexity4.00
▷ Maximum class complexity12.00
Average method complexity2.29
▷ Minimum method complexity1.00
▷ Maximum method complexity5.00
Code structure
Namespaces3
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods17
▷ Static methods15.88%
▷ Public methods1694.12%
▷ Protected methods00.00%
▷ Private methods15.88%
Functions0
▷ Named functions00.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