84% wpcomment-blacklist-support-for-gravity-forms

Code Review | WPComment Blacklist support for Gravity Forms

WordPress plugin WPComment Blacklist support for Gravity Forms scored 84% from 54 tests.

About plugin

  • Plugin page: wpcomment-blackli...
  • Plugin version: 1.2.0
  • PHP compatiblity: 5.6.38+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.8-5.2.3
  • WordPress version: 6.3.1
  • First release: Sep 20, 2019
  • Latest release: Sep 27, 2019
  • Number of updates: 9
  • Update frequency: every 0.8 days
  • Top authors: us0343 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

60+ active / 540 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.02MB] [CPU: ▼6.95ms] Passed 4 tests

This is a short check of server-side resources used by WPComment Blacklist support for Gravity Forms
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0235.94 ▼11.89
Dashboard /wp-admin3.33 ▲0.0247.15 ▼8.91
Posts /wp-admin/edit.php3.38 ▲0.0251.89 ▲0.88
Add New Post /wp-admin/post-new.php5.93 ▲0.0495.40 ▼5.15
Media Library /wp-admin/upload.php3.25 ▲0.0234.70 ▼1.83

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for WPComment Blacklist support for Gravity Forms
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,820 ▲7413.23 ▼1.321.76 ▼0.3841.86 ▼3.48
Dashboard /wp-admin2,226 ▲354.88 ▼0.15110.68 ▲5.8539.12 ▼6.90
Posts /wp-admin/edit.php2,109 ▲202.00 ▼0.0440.74 ▲1.9834.66 ▼1.18
Add New Post /wp-admin/post-new.php1,531 ▼223.56 ▲0.53595.29 ▼91.8449.94 ▼4.70
Media Library /wp-admin/upload.php1,408 ▲204.22 ▲0.0095.19 ▼24.5142.37 ▼9.08

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • db_upgraded
    • widget_recent-comments
    • can_compress_scripts
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_theysaidso_widget

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
Even though everything seems fine, this is not an exhaustive test

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
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wpcomment-blacklist-support-for-gravity-forms/mainfunctions.php:9

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser errors were detected

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
6 plugin tags: gravity, words, comment, forms, blacklist...

wpcomment-blacklist-support-for-gravity-forms/mainfunctions.php 92% from 13 tests

"WPComment Blacklist support for Gravity Forms" version 1.2.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
Please make the necessary changes and fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("wpcomment-blacklist-support-for-gravity-forms.php" instead of "mainfunctions.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 plugin177 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP118997
CSS10066
JavaScript14114

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.19
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%
Functions7
▷ Named functions571.43%
▷ Anonymous functions228.57%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
1 PNG file occupies 0.01MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
images/become_a_patron_button.png6.42KB2.90KB▼ 54.81%