10% beyond-pay-for-gravity-forms

Code Review | Beyond Pay for Gravity Forms

WordPress plugin Beyond Pay for Gravity Forms scored10%from 54 tests.

About plugin

  • Plugin page: beyond-pay-for-gr...
  • Plugin version: 1.2.2
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-6.1.1
  • WordPress version: 6.3.1
  • First release: Aug 20, 2021
  • Latest release: Nov 22, 2023
  • Number of updates: 18
  • Update frequency: every 45.8 days
  • Top authors: beyondpay (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,632 total downloads

Benchmarks

Plugin footprint 58% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
It is recommended to fix the following installer errors
  • The plugin did not install without errors
    • > Error in wp-content/plugins/beyond-pay-for-gravity-forms/beyond-pay-gravity-forms.php+17
    Uncaught Error: Class 'GFForms' not found in wp-content/plugins/beyond-pay-for-gravity-forms/beyond-pay-gravity-forms.php:17
    Stack trace:
    #0 wp-admin/includes/plugin.php(2318): include_once()
    #1 wp-admin/includes/plugin.php(663): plugin_sandbox_scrape()

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

This is a short check of server-side resources used by Beyond Pay for Gravity Forms
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0037.57 ▼3.70
Dashboard /wp-admin3.31 ▼0.0447.51 ▼14.57
Posts /wp-admin/edit.php3.36 ▲0.0046.74 ▼4.35
Add New Post /wp-admin/post-new.php5.89 ▲0.0094.95 ▼6.87
Media Library /wp-admin/upload.php3.23 ▲0.0035.68 ▲3.33

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

Filesystem and database footprint
This plugin installed successfully
Filesystem: 17 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
widget_recent-comments
db_upgraded
widget_recent-posts
theysaidso_admin_options
can_compress_scripts

Browser metrics Passed 4 tests

This is an overview of browser requirements for Beyond Pay for Gravity Forms
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,815 ▲5314.10 ▼0.151.84 ▲0.0136.84 ▼5.33
Dashboard /wp-admin2,198 ▲185.64 ▲0.0192.39 ▼8.4538.84 ▼10.36
Posts /wp-admin/edit.php2,100 ▼32.01 ▼0.0138.90 ▼2.0836.48 ▲2.81
Add New Post /wp-admin/post-new.php1,526 ▼023.28 ▲0.10595.62 ▼2.3345.60 ▼6.17
Media Library /wp-admin/upload.php1,400 ▼34.19 ▼0.1194.69 ▼5.4042.81 ▲0.55

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
The following items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_theysaidso_widget
    • can_compress_scripts
    • db_upgraded
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_recent-comments

Smoke tests 75% from 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 50% from 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
Almost there! Just fix the following items
  • 3× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Class 'GFForms' not found in wp-content/plugins/beyond-pay-for-gravity-forms/beyond-pay-gravity-forms.php:17
    • > PHP Fatal error
      Uncaught Error: Class 'GF_Field' not found in wp-content/plugins/beyond-pay-for-gravity-forms/includes/gf-field-beyond-pay.php:2
    • > PHP Fatal error
      Uncaught Error: Class 'GFPaymentAddOn' not found in wp-content/plugins/beyond-pay-for-gravity-forms/includes/gf-beyond-pay.php:2

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
5 plugin tags: gravity forms, credit card, donation, payment, payment gateway

beyond-pay-for-gravity-forms/beyond-pay-gravity-forms.php 85% from 13 tests

This is the main PHP file of "Beyond Pay for Gravity Forms" version 1.2.2, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
It is important to fix the following:
  • 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
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("beyond-pay-for-gravity-forms.php" instead of "beyond-pay-gravity-forms.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Success! There were no dangerous files found in this plugin1,546 lines of code in 10 files:
LanguageFilesBlank linesComment linesLines of code
PHP4497821,157
JavaScript4179216
Markdown1440107
CSS10066

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.17
Average class complexity6.82
▷ Minimum class complexity1.00
▷ Maximum class complexity49.00
Average method complexity3.11
▷ Minimum method complexity1.00
▷ Maximum method complexity19.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes17
▷ Abstract classes00.00%
▷ Concrete classes17100.00%
▷ Final classes00.00%
Methods46
▷ Static methods1634.78%
▷ Public methods4086.96%
▷ Protected methods00.00%
▷ Private methods613.04%
Functions4
▷ Named functions250.00%
▷ Anonymous functions250.00%
Constants7
▷ Global constants00.00%
▷ Class constants7100.00%
▷ Public constants7100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
5 PNG files occupy 0.35MB with 0.23MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/screenshot-4.png75.51KB25.66KB▼ 66.02%
assets/screenshot-5.png80.59KB27.07KB▼ 66.41%
assets/screenshot-3.png61.25KB21.07KB▼ 65.61%
assets/screenshot-1.png46.51KB16.88KB▼ 63.70%
assets/screenshot-2.png93.02KB30.78KB▼ 66.91%