78% paay-for-gravity-form

Code Review | Gravity Forms PAAY Standard Add-On

WordPress plugin Gravity Forms PAAY Standard Add-On scored 78% from 54 tests.

About plugin

  • Plugin page: paay-for-gravity-...
  • Plugin version: 2.4.9
  • PHP version: 7.4.16
  • WordPress compatibility: 4.1-4.1
  • WordPress version: 6.3.1
  • First release: Sep 10, 2015
  • Latest release: Feb 13, 2017
  • Number of updates: 46
  • Update frequency: every 11.4 days
  • Top authors: paay (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 953 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
This plugin's installer ran successfully

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

A check of server-side resources used by Gravity Forms PAAY Standard Add-On
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0136.05 ▼2.85
Dashboard /wp-admin3.31 ▲0.0149.73 ▼0.84
Posts /wp-admin/edit.php3.36 ▲0.0147.92 ▲1.29
Add New Post /wp-admin/post-new.php5.89 ▲0.0188.08 ▼5.45
Media Library /wp-admin/upload.php3.23 ▲0.0035.36 ▲1.75

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

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

Browser metrics Passed 4 tests

Gravity Forms PAAY Standard Add-On: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6514.78 ▲0.101.73 ▲0.1041.03 ▲2.67
Dashboard /wp-admin2,200 ▲155.91 ▲0.05109.14 ▲10.9539.33 ▼2.89
Posts /wp-admin/edit.php2,086 ▼62.03 ▲0.0637.27 ▲0.1533.12 ▲1.28
Add New Post /wp-admin/post-new.php1,522 ▼2023.50 ▲5.26657.66 ▲59.1844.00 ▼32.45
Media Library /wp-admin/upload.php1,391 ▲34.17 ▼0.0494.29 ▼1.3140.89 ▼2.40

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
You still need to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-comments
    • widget_theysaidso_widget
    • widget_recent-posts
    • db_upgraded
    • can_compress_scripts
    • theysaidso_admin_options

Smoke tests 50% 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 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 items
  • 2× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/paay-for-gravity-form/templates/dashboard_css.php
    • > /wp-content/plugins/paay-for-gravity-form/templates/paay_gf_scripts.php
  • 18× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Interface 'PAAY\\Plugin\\Validation\\Components\\ValidatorInterface' not found in wp-content/plugins/paay-for-gravity-form/paay_lib/src/PAAY/Plugin/Validation/Components/Text.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'Symfony\\Component\\Yaml\\Exception\\RuntimeException' not found in wp-content/plugins/paay-for-gravity-form/paay_lib/vendor/symfony/yaml/Exception/DumpException.php:21
    • > PHP Fatal error
      Uncaught Error: Interface 'PAAY\\Plugin\\Validation\\Components\\ValidatorInterface' not found in wp-content/plugins/paay-for-gravity-form/paay_lib/src/PAAY/Plugin/Validation/Components/Details.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'PAAY\\Plugin\\Storage\\Component\\StorageComponent' not found in wp-content/plugins/paay-for-gravity-form/paay_lib/src/PAAY/Plugin/Storage/Component/BillingAddress.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'PAAY\\Plugin\\Storage\\Component\\StorageComponent' not found in wp-content/plugins/paay-for-gravity-form/paay_lib/src/PAAY/Plugin/Storage/Component/Basic.php:7
    • > PHP Fatal error
      Uncaught Error: Interface 'Symfony\\Component\\Yaml\\Exception\\ExceptionInterface' not found in wp-content/plugins/paay-for-gravity-form/paay_lib/vendor/symfony/yaml/Exception/RuntimeException.php:21
    • > PHP Fatal error
      Uncaught Error: Interface 'PAAY\\Plugin\\Validation\\Components\\ValidatorInterface' not found in wp-content/plugins/paay-for-gravity-form/paay_lib/src/PAAY/Plugin/Validation/Components/Email.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'PAAY\\Plugin\\Storage\\Component\\StorageComponent' not found in wp-content/plugins/paay-for-gravity-form/paay_lib/src/PAAY/Plugin/Storage/Component/ShippingAddress.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'Symfony\\Component\\ClassLoader\\UniversalClassLoader' not found in wp-content/plugins/paay-for-gravity-form/paay_lib/vendor/symfony/class-loader/ApcUniversalClassLoader.php:66
    • > PHP Fatal error
      Uncaught Error: Class 'Symfony\\Component\\ClassLoader\\UniversalClassLoader' not found in wp-content/plugins/paay-for-gravity-form/paay_lib/vendor/symfony/class-loader/DebugUniversalClassLoader.php:24

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
There were no browser issues found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt Passed 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
8 plugin tags: form, gateway, plugin, gravity, credit card...

paay-for-gravity-form/paay.php 77% from 13 tests

Analyzing the main PHP file in "Gravity Forms PAAY Standard Add-On" version 2.4.9
It is important to fix the following:
  • Git Repository: A Git repository was detected inside this plugin
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("paay-for-gravity-form.php" instead of "paay.php")
  • Text Domain: If you choose to specify the text domain, it must be the same as the plugin slug; optional since WordPress version 4.6

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Everything looks great! No dangerous files found in this plugin5,485 lines of code in 94 files:
LanguageFilesBlank linesComment linesLines of code
PHP801,0281,8914,752
JSON500290
CSS232200
YAML10097
JavaScript114159
XML26051
Markdown312036

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.45
Average class complexity10.40
▷ Minimum class complexity1.00
▷ Maximum class complexity130.00
Average method complexity3.27
▷ Minimum method complexity1.00
▷ Maximum method complexity74.00
Code structure
Namespaces14
Interfaces7
Traits0
Classes65
▷ Abstract classes34.62%
▷ Concrete classes6295.38%
▷ Final classes00.00%
Methods319
▷ Static methods5316.61%
▷ Public methods25579.94%
▷ Protected methods51.57%
▷ Private methods5918.50%
Functions17
▷ Named functions1376.47%
▷ Anonymous functions423.53%
Constants54
▷ Global constants35.56%
▷ Class constants5194.44%
▷ Public constants51100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
There were not PNG files found in your plugin