83% bsk-gravityforms-blacklist

Code Review | BSK Forms Blacklist

WordPress plugin BSK Forms Blacklist scored83%from 54 tests.

About plugin

  • Plugin page: bsk-gravityforms-...
  • Plugin version: 3.7
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-6.4.1
  • WordPress version: 6.3.1
  • First release: May 11, 2017
  • Latest release: Nov 21, 2023
  • Number of updates: 35
  • Update frequency: every 68.2 days
  • Top authors: bannersky (100%)

Code review

54 tests

User reviews

8 reviews

Install metrics

1,000+ active /21,089 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: ▲1.34MB] [CPU: ▲9.02ms] Passed 4 tests

A check of server-side resources used by BSK Forms Blacklist
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /4.80 ▲1.3343.15 ▲9.19
Dashboard /wp-admin4.65 ▲1.3464.06 ▲5.71
Posts /wp-admin/edit.php4.70 ▲1.3457.47 ▲11.70
Add New Post /wp-admin/post-new.php7.25 ▲1.36100.96 ▲9.48
Media Library /wp-admin/upload.php4.57 ▲1.3445.37 ▲12.29
Settings /wp-admin/admin.php?page=bsk-forms-settings4.5842.51
White list /wp-admin/admin.php?page=bsk-forms-whitelist4.5441.98
Email list /wp-admin/admin.php?page=bsk-forms-emailist4.5441.74
Invitation Codes List /wp-admin/admin.php?page=bsk-forms-invitation-codes-list4.5441.52
Blocked data /wp-admin/admin.php?page=bsk-forms-blocked-data4.5439.60
IP list /wp-admin/admin.php?page=bsk-forms-iplist4.5441.71
Blacklist /wp-admin/admin.php?page=bsk-forms-blacklist4.5439.79

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

How much does this plugin use your filesystem and database?
This plugin was installed successfully
Filesystem: 53 new files
Database: 4 new tables, 8 new options
New tables
wp_bsk_gfbl_hits
wp_bsk_gfbl_entries
wp_bsk_gfbl_items
wp_bsk_gfbl_list
New WordPress options
_bsk_gfbl_integrate_cf7_blacklist_done_
can_compress_scripts
widget_recent-comments
db_upgraded
widget_recent-posts
theysaidso_admin_options
_bsk_gfbl_db_ver_
widget_theysaidso_widget

Browser metrics Passed 4 tests

A check of browser resources used by BSK Forms Blacklist
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,920 ▲15813.42 ▼0.937.83 ▲6.1939.15 ▲3.29
Dashboard /wp-admin2,249 ▲725.65 ▲0.0099.83 ▲0.1741.13 ▲2.72
Posts /wp-admin/edit.php2,154 ▲572.02 ▲0.0742.14 ▲5.0935.36 ▼1.78
Add New Post /wp-admin/post-new.php1,567 ▲3223.56 ▼1.44696.14 ▲26.4553.09 ▼17.80
Media Library /wp-admin/upload.php1,451 ▲484.26 ▲0.08105.21 ▲6.2246.72 ▲4.79
Settings /wp-admin/admin.php?page=bsk-forms-settings1,9237.15158.8534.80
White list /wp-admin/admin.php?page=bsk-forms-whitelist1,0192.1028.7029.48
Email list /wp-admin/admin.php?page=bsk-forms-emailist1,0152.1026.7227.85
Invitation Codes List /wp-admin/admin.php?page=bsk-forms-invitation-codes-list1,0152.1027.0626.91
Blocked data /wp-admin/admin.php?page=bsk-forms-blocked-data1,0552.0423.5928.60
IP list /wp-admin/admin.php?page=bsk-forms-iplist1,0182.1029.1028.42
Blacklist /wp-admin/admin.php?page=bsk-forms-blacklist1,0192.1025.9728.80

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-comments
    • widget_recent-posts
    • widget_theysaidso_widget
    • db_upgraded
    • can_compress_scripts
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Good news, no errors were detected

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please fix the following items
  • 10× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Warning
      require_once(ABSPATHwp-admin/includes/class-wp-list-table.php): failed to open stream: No such file or directory in wp-content/plugins/bsk-gravityforms-blacklist/classes/dashboard/lists.php on line 4
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/bsk-gravityforms-blacklist/classes/dashboard/lists.php on line 4
    • > PHP Fatal error
      require_once(): Failed opening required 'ABSPATHwp-admin/includes/class-wp-list-table.php' (include_path='.:/usr/share/php') in wp-content/plugins/bsk-gravityforms-blacklist/classes/dashboard/entries.php on line 4
    • > PHP Fatal error
      require_once(): Failed opening required 'ABSPATHwp-admin/includes/class-wp-list-table.php' (include_path='.:/usr/share/php') in wp-content/plugins/bsk-gravityforms-blacklist/classes/dashboard/lists.php on line 4
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/bsk-gravityforms-blacklist/classes/dashboard/entries.php on line 4
    • > PHP Fatal error
      Uncaught Error: Class 'WP_List_Table' not found in wp-content/plugins/bsk-gravityforms-blacklist/classes/dashboard/forminator/forms-list.php:3
    • > PHP Warning
      require_once(ABSPATHwp-admin/includes/class-wp-list-table.php): failed to open stream: No such file or directory in wp-content/plugins/bsk-gravityforms-blacklist/classes/dashboard/items.php on line 4
    • > PHP Warning
      require_once(ABSPATHwp-admin/includes/class-wp-list-table.php): failed to open stream: No such file or directory in wp-content/plugins/bsk-gravityforms-blacklist/classes/dashboard/entries.php on line 4
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/bsk-gravityforms-blacklist/classes/dashboard/items.php on line 4
    • > PHP Fatal error
      require_once(): Failed opening required 'ABSPATHwp-admin/includes/class-wp-list-table.php' (include_path='.:/usr/share/php') in wp-content/plugins/bsk-gravityforms-blacklist/classes/dashboard/items.php on line 4

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
There were no browser issues found

Optimizations

Plugin configuration 93% 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 require attention:
  • Screenshots: These screenshots do not have images: #1 (Backend menu), #2 (Interface of creating blacklist and add items ( keywords )), #3 (Plugin setting page to choose the form plugin to be supported), #4 (Gravity Forms form setting page), #5 (Apply blacklist to Gravity Forms form field), #6 (Formidable Forms form setting page), #7 (Apply blacklist to Formidable Forms form field), #8 (Blocked when submit form)
You can look at the official readme.txt

bsk-gravityforms-blacklist/bsk-gravityforms-blacklist.php 92% from 13 tests

The main PHP file in "BSK Forms Blacklist" ver. 3.7 adds more information about the plugin and also serves as the entry point for this plugin
It is important to fix the following:
  • Description: Please don't use more than 140 characters for the plugin description (currently 256 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
Everything looks great! No dangerous files found in this plugin10,487 lines of code in 38 files:
LanguageFilesBlank linesComment linesLines of code
PHP341,4433449,368
JavaScript319367806
CSS16617313

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.42
Average class complexity46.00
▷ Minimum class complexity1.00
▷ Maximum class complexity133.00
Average method complexity8.46
▷ Minimum method complexity1.00
▷ Maximum method complexity71.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes32
▷ Abstract classes00.00%
▷ Concrete classes32100.00%
▷ Final classes00.00%
Methods193
▷ Static methods178.81%
▷ Public methods19299.48%
▷ Protected methods00.00%
▷ Private methods10.52%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
11 PNG files occupy 0.59MB with 0.46MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-7.png76.07KB21.52KB▼ 71.71%
images/active1.png15.01KB1.06KB▼ 92.96%
images/active0.png14.99KB1.11KB▼ 92.58%
screenshot-8.png50.71KB15.67KB▼ 69.11%
screenshot-3.png58.82KB20.38KB▼ 65.35%