84% gravity-forms-reject-disposable-emails

Code Review | Gravity Forms Reject Disposable Emails

WordPress plugin Gravity Forms Reject Disposable Emails scored84%from 54 tests.

About plugin

  • Plugin page: gravity-forms-rej...
  • Plugin version: 1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-3.8
  • WordPress version: 6.3.1
  • First release: May 6, 2013
  • Latest release: Jan 11, 2014
  • Number of updates: 15
  • Update frequency: every 16.7 days
  • Top authors: ethanpil (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

20+ active /4,162 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.00MB] [CPU: ▼1.53ms] Passed 4 tests

This is a short check of server-side resources used by Gravity Forms Reject Disposable Emails
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0136.87 ▼4.60
Dashboard /wp-admin3.31 ▲0.0044.04 ▼4.30
Posts /wp-admin/edit.php3.36 ▲0.0048.96 ▲4.14
Add New Post /wp-admin/post-new.php5.89 ▲0.0087.75 ▲1.23
Media Library /wp-admin/upload.php3.23 ▲0.0033.53 ▲1.54

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

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 2 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
can_compress_scripts
widget_recent-comments
widget_theysaidso_widget
db_upgraded
theysaidso_admin_options

Browser metrics Passed 4 tests

Gravity Forms Reject Disposable Emails: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6513.29 ▼1.391.73 ▲0.0240.22 ▼8.17
Dashboard /wp-admin2,206 ▲184.87 ▲0.01112.91 ▼0.1442.66 ▲0.35
Posts /wp-admin/edit.php2,086 ▼02.05 ▲0.0139.47 ▲3.2933.81 ▼0.58
Add New Post /wp-admin/post-new.php1,533 ▼923.34 ▲5.10667.61 ▲52.3653.98 ▼1.32
Media Library /wp-admin/upload.php1,388 ▼04.18 ▲0.03100.60 ▲1.3643.13 ▲1.67

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • db_upgraded
    • widget_recent-posts
    • widget_recent-comments
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Even though everything seems fine, this is not an exhaustive test

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
The following issues need your attention
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/gravity-forms-reject-disposable-emails/gravityforms-reject-disposable-emails.php:13

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
4 plugin tags: gravity forms, gravity, validation, disposable email

gravity-forms-reject-disposable-emails/gravityforms-reject-disposable-emails.php 85% from 13 tests

The main PHP script in "Gravity Forms Reject Disposable Emails" version 1.1 is automatically included on every request by WordPress
It is important to fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("gravity-forms-reject-disposable-emails.php" instead of "gravityforms-reject-disposable-emails.php")
  • Text Domain: The text domain is optional since WordPress version 4.6; if you do specify it, it must be the same as the plugin slug

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Good job! No executable or dangerous file extensions detected525 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP11422525

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.27
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%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
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
There are no PNG files in this plugin