90% gravity-forms-zero-spam

Code Review | Gravity Forms Zero Spam

WordPress plugin Gravity Forms Zero Spam scored90%from 54 tests.

About plugin

  • Plugin page: gravity-forms-zer...
  • Plugin version: 1.4.1
  • PHP compatiblity: 5.2.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-6.4.1
  • WordPress version: 6.3.1
  • First release: Oct 6, 2014
  • Latest release: Nov 10, 2023
  • Number of updates: 62
  • Update frequency: every 53.6 days
  • Top authors: gravityview (53.23%)karpstrucking (48.39%)

Code review

54 tests

User reviews

20 reviews

Install metrics

80,000+ active /484,329 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Install script ran successfully

Server metrics [RAM: ▲0.01MB] [CPU: ▼9.88ms] Passed 4 tests

Server-side resources used by Gravity Forms Zero Spam
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0238.61 ▼1.97
Dashboard /wp-admin3.33 ▼0.0246.10 ▼17.07
Posts /wp-admin/edit.php3.38 ▲0.0247.21 ▲3.24
Add New Post /wp-admin/post-new.php5.91 ▲0.0287.01 ▼17.46
Media Library /wp-admin/upload.php3.25 ▲0.0231.46 ▼3.00

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

A short overview of filesystem and database impact
The plugin installed successfully
Filesystem: 4 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
theysaidso_admin_options
can_compress_scripts
db_upgraded
widget_theysaidso_widget
widget_recent-comments

Browser metrics Passed 4 tests

An overview of browser requirements for Gravity Forms Zero Spam
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,815 ▲4314.27 ▼0.082.03 ▲0.1144.34 ▲2.58
Dashboard /wp-admin2,195 ▲185.62 ▼0.0388.57 ▼1.5140.04 ▲1.16
Posts /wp-admin/edit.php2,103 ▼02.15 ▲0.1638.67 ▼2.2636.36 ▲0.41
Add New Post /wp-admin/post-new.php1,526 ▼923.50 ▼1.76594.03 ▼21.3658.23 ▼9.27
Media Library /wp-admin/upload.php1,397 ▼64.24 ▼0.0199.46 ▼0.0244.95 ▼0.05

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-comments
    • widget_recent-posts
    • db_upgraded

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Good news, no errors were detected

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
Looking good! No server-side errors or output on direct access of PHP files

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
10 plugin tags: anti-spam, add-ons, gravity forms, gravityforms, honeypot...

gravity-forms-zero-spam/gravityforms-zero-spam.php 92% from 13 tests

Analyzing the main PHP file in "Gravity Forms Zero Spam" version 1.4.1
You should first fix the following items:
  • Main file name: Name the main plugin file the same as the plugin slug ("gravity-forms-zero-spam.php" instead of "gravityforms-zero-spam.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Good job! No executable or dangerous file extensions detected504 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP2140218504

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.33
Average class complexity26.50
▷ Minimum class complexity19.00
▷ Maximum class complexity34.00
Average method complexity2.88
▷ Minimum method complexity1.00
▷ Maximum method complexity11.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods26
▷ Static methods27.69%
▷ Public methods2180.77%
▷ Protected methods00.00%
▷ Private methods519.23%
Functions4
▷ Named functions00.00%
▷ Anonymous functions4100.00%
Constants3
▷ Global constants133.33%
▷ Class constants266.67%
▷ Public constants2100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
No PNG images were found in this plugin