78% fb-gocardless-hosted-for-gravity-forms

Code Review | FB GoCardless Hosted for Gravity Forms

WordPress plugin FB GoCardless Hosted for Gravity Forms scored 78% from 54 tests.

About plugin

  • Plugin page: fb-gocardless-hos...
  • Plugin version: 1.1.5
  • PHP version: 7.4.16
  • WordPress compatibility: 4.9.2-4.9.2
  • WordPress version: 6.3.1
  • First release: Jan 26, 2018
  • Latest release: Sep 25, 2018
  • Number of updates: 19
  • Update frequency: every 12.8 days
  • Top authors: fatbeehive (63.16%)seuser (42.11%)

Code review

54 tests

User reviews

1 review

Install metrics

40+ active / 1,430 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
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.32MB] [CPU: ▼1.82ms] Passed 4 tests

A check of server-side resources used by FB GoCardless Hosted for Gravity Forms
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.82 ▲0.3640.33 ▼2.62
Dashboard /wp-admin3.66 ▲0.3649.05 ▲3.72
Posts /wp-admin/edit.php3.71 ▲0.3649.42 ▲0.29
Add New Post /wp-admin/post-new.php6.18 ▲0.2997.55 ▼5.08
Media Library /wp-admin/upload.php3.52 ▲0.2937.68 ▲0.14

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

Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 229 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
widget_recent-comments
widget_theysaidso_widget
theysaidso_admin_options
can_compress_scripts
db_upgraded

Browser metrics Passed 4 tests

This is an overview of browser requirements for FB GoCardless Hosted for Gravity Forms
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6513.31 ▼1.001.75 ▼0.0341.00 ▼3.30
Dashboard /wp-admin2,203 ▲115.89 ▲0.98105.13 ▼8.0040.76 ▲0.36
Posts /wp-admin/edit.php2,089 ▼01.98 ▼0.0539.23 ▼1.2335.74 ▲0.83
Add New Post /wp-admin/post-new.php1,534 ▼823.15 ▲4.91593.22 ▼74.6352.19 ▼0.54
Media Library /wp-admin/upload.php1,391 ▲34.20 ▲0.0699.98 ▼17.8140.42 ▼7.22

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
Please fix the following items
  • This plugin does not fully uninstall, leaving 6 options in the database
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-comments
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-posts

Smoke tests 50% 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 0% 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
  • 2× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/fb-gocardless-hosted-for-gravity-forms/classes/class-fb-gf-gocardless-hosted.php
    • > /wp-content/plugins/fb-gocardless-hosted-for-gravity-forms/fb-gforms-gocardless-hosted.php
  • 111× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit_Framework_TestCase' not found in wp-content/plugins/fb-gocardless-hosted-for-gravity-forms/vendor/gocardless/gocardless-pro/tests/Core/Exceptions/ExceptionMessagesTest.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'GoCardlessPro\\Resources\\Base' not found in wp-content/plugins/fb-gocardless-hosted-for-gravity-forms/vendor/gocardless/gocardless-pro/tests/Core/Mocks/MockResource.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'GoCardlessPro\\Resources\\BaseResource' not found in wp-content/plugins/fb-gocardless-hosted-for-gravity-forms/vendor/gocardless/gocardless-pro/lib/Resources/MandatePdf.php:17
    • > PHP Fatal error
      Uncaught Error: Class 'GoCardlessPro\\Services\\BaseService' not found in wp-content/plugins/fb-gocardless-hosted-for-gravity-forms/vendor/gocardless/gocardless-pro/lib/Services/CustomersService.php:21
    • > PHP Fatal error
      Uncaught Error: Class 'GoCardlessPro\\Resources\\BaseResource' not found in wp-content/plugins/fb-gocardless-hosted-for-gravity-forms/vendor/gocardless/gocardless-pro/lib/Resources/Mandate.php:24
    • > PHP Fatal error
      Uncaught Error: Interface 'Psr\\Http\\Message\\StreamInterface' not found in wp-content/plugins/fb-gocardless-hosted-for-gravity-forms/vendor/guzzlehttp/psr7/src/PumpStream.php:16
    • > PHP Fatal error
      Uncaught Error: Class 'GoCardlessPro\\Services\\BaseService' not found in wp-content/plugins/fb-gocardless-hosted-for-gravity-forms/vendor/gocardless/gocardless-pro/lib/Services/SubscriptionsService.php:21
    • > PHP Fatal error
      Uncaught Error: Class 'GoCardlessPro\\Integration\\IntegrationTestBase' not found in wp-content/plugins/fb-gocardless-hosted-for-gravity-forms/vendor/gocardless/gocardless-pro/tests/Integration/MandatesIntegrationTest.php:9
    • > PHP Fatal error
      Uncaught Error: Class 'GoCardlessPro\\Resources\\BaseResource' not found in wp-content/plugins/fb-gocardless-hosted-for-gravity-forms/vendor/gocardless/gocardless-pro/lib/Resources/Event.php:22
    • > PHP Fatal error
      Uncaught Error: Class 'GoCardlessPro\\Integration\\IntegrationTestBase' not found in wp-content/plugins/fb-gocardless-hosted-for-gravity-forms/vendor/gocardless/gocardless-pro/tests/Integration/SubscriptionsIntegrationTest.php:9

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
These attributes need your attention:
  • Screenshots: A description for screenshot #1 is required in fb-gocardless-hosted-for-gravity-forms/assets to your readme.txt
  • Plugin Name: "Plugin Name" should be replaced with the name of your plugin on the first line ( === fb-gocardless-hosted-for-gravity-forms === )
The official readme.txt is a good inspiration

fb-gocardless-hosted-for-gravity-forms/fb-gforms-gocardless-hosted.php 92% from 13 tests

The primary PHP file in "FB GoCardless Hosted for Gravity Forms" version 1.1.5 is used by WordPress to initiate all plugin functionality
You should first fix the following items:
  • Main file name: Name the main plugin file the same as the plugin slug ("fb-gocardless-hosted-for-gravity-forms.php" instead of "fb-gforms-gocardless-hosted.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Everything looks great! No dangerous files found in this plugin17,150 lines of code in 218 files:
LanguageFilesBlank linesComment linesLines of code
PHP1733,3527,17612,797
Markdown1099303,324
JSON29160928
JavaScript17947
make211028
XML22017
YAML1009

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.27
Average class complexity8.70
▷ Minimum class complexity1.00
▷ Maximum class complexity81.00
Average method complexity2.33
▷ Minimum method complexity1.00
▷ Maximum method complexity27.00
Code structure
Namespaces16
Interfaces14
Traits3
Classes145
▷ Abstract classes42.76%
▷ Concrete classes14197.24%
▷ Final classes74.96%
Methods934
▷ Static methods727.71%
▷ Public methods78283.73%
▷ Protected methods293.10%
▷ Private methods12313.17%
Functions147
▷ Named functions5436.73%
▷ Anonymous functions9363.27%
Constants55
▷ Global constants00.00%
▷ Class constants55100.00%
▷ Public constants55100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
No PNG images were found in this plugin