99% 2bc-form-security

Code Review | 2BC Form Security

WordPress plugin 2BC Form Security scored 99% from 54 tests.

About plugin

  • Plugin page: 2bc-form-security
  • Plugin version: 2.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.6-4.2.2
  • WordPress version: 5.9.2
  • First release: Apr 8, 2015
  • Latest release: May 7, 2015
  • Number of updates: 11
  • Update frequency: every 2.7 days
  • Top authors: 2bc_jason (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 1,500 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Installer ran successfully

Server metrics [RAM: ▲0.04MB] [CPU: ▼293.91ms] Passed 4 tests

A check of server-side resources used by 2BC Form Security
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.56 ▲0.0559.95 ▲5.04
Dashboard /wp-admin3.49 ▲0.0939.85 ▼1.28
Posts /wp-admin/edit.php3.71 ▲0.0741.70 ▼1.01
Add New Post /wp-admin/post-new.php6.98 ▼0.02102.61 ▼1,178.12
Media Library /wp-admin/upload.php3.37 ▲0.0731.32 ▲4.78
2BC Form Security /wp-admin/options-general.php?page=twobc_formsecurity3.3425.24

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

How much does this plugin use your filesystem and database?
This plugin was installed successfully
Filesystem: 17 new files
Database: 1 new table, 1 new option
New tables
wp_twobc_formsecurity_log
New WordPress options
twobc_formsecurity_options

Browser metrics Passed 4 tests

This is an overview of browser requirements for 2BC Form Security
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /4,018 ▲27615.78 ▲0.006.69 ▲0.411.98 ▼0.15
Dashboard /wp-admin3,137 ▲2766.24 ▲0.09117.10 ▼15.16186.82 ▲22.42
Posts /wp-admin/edit.php2,680 ▼113.25 ▲0.0064.53 ▲0.48146.52 ▲1.69
Add New Post /wp-admin/post-new.php1,766 ▲821.69 ▲0.37479.43 ▲17.91157.13 ▼0.31
Media Library /wp-admin/upload.php1,718 ▲175.49 ▼0.03139.21 ▼1.03185.47 ▲5.15
2BC Form Security /wp-admin/options-general.php?page=twobc_formsecurity1,4053.2263.78145.20

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The plugin uninstalled completely, with no zombie files or tables

Smoke tests Passed 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 Passed 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
Congratulations! This plugin passed the SRP test

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser issues were found

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
Attributes that need to be fixed:
  • Tags: Please delete some tags, you are using 17 tag instead of maximum 10
The official readme.txt might help

2bc-form-security/2bc-form-security.php Passed 13 tests

The main file in "2BC Form Security" v. 2.0.1 serves as a complement to information provided in readme.txt and as the entry point to the plugin
134 characters long description:
Increase security and reduce spam by adding a honeypot and Google reCAPTCHA V2 to the log in form, registration form, and comment form

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
There were no executable files found in this plugin2,738 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code
PHP44036771,954
PO File1102103291
CSS2379285
JavaScript191208

PHP code 50% from 2 tests

A short review of cyclomatic complexity and code structure
It is recommended to fix the following
  • Please reduce cyclomatic complexity of methods to less than 100 (currently 125)
Cyclomatic complexity
Average complexity per logical line of code0.53
Average class complexity165.50
▷ Minimum class complexity125.00
▷ Maximum class complexity206.00
Average method complexity6.77
▷ Minimum method complexity1.00
▷ Maximum method complexity125.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods57
▷ Static methods5291.23%
▷ Public methods4375.44%
▷ Protected methods00.00%
▷ Private methods1424.56%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
1 compressed PNG file occupies 0.00MB
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
images/buddypress.png1.40KB1.20KB▼ 14.25%