10% wpformify

Code Review | WPFormify – Stripe Payments with Form and Checkout

WordPress plugin WPFormify – Stripe Payments with Form and Checkout scored 10% from 54 tests.

About plugin

  • Plugin page: wpformify
  • Plugin version: 1.1.0
  • PHP compatiblity: 5.5+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.5.0-6.0
  • WordPress version: 6.3.1
  • First release: Dec 29, 2021
  • Latest release: May 24, 2022
  • Number of updates: 9
  • Update frequency: every 16.3 days
  • Top authors: wpexpertsio (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 1,539 total downloads

Benchmarks

Plugin footprint 23% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
It is recommended to fix the following installer errors
  • The plugin cannot be installed
    • > Notice in wp-content/plugins/wpformify/wp-formify.php+270
    Undefined variable: charset_collate

Server metrics [RAM: ▲0.42MB] [CPU: ▼7.15ms] Passed 4 tests

An overview of server-side resources used by WPFormify – Stripe Payments with Form and Checkout
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /4.03 ▲0.5740.52 ▼3.40
Dashboard /wp-admin3.61 ▲0.3137.06 ▼11.49
Posts /wp-admin/edit.php3.83 ▲0.4840.54 ▼8.61
Add New Post /wp-admin/post-new.php6.22 ▲0.3386.86 ▼5.10
Media Library /wp-admin/upload.php3.78 ▲0.5639.25 ▲5.07
Freemius Debug [v.2.4.3] /wp-admin/admin.php?page=freemius3.9936.79

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

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 1,055 new files
Database: 1 new table, 13 new options
New tables
wp_wpstp_stripe_customers
New WordPress options
wpep_refresh_token
fs_active_plugins
wpep_token_expires_at
widget_theysaidso_widget
widget_recent-posts
fs_gdpr
widget_recent-comments
fs_accounts
wpep_live_token_upgraded
theysaidso_admin_options
...

Browser metrics Passed 4 tests

An overview of browser requirements for WPFormify – Stripe Payments with Form and Checkout
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,999 ▲26415.79 ▲1.517.77 ▲6.1733.19 ▼10.53
Dashboard /wp-admin2,279 ▲916.41 ▲1.35101.50 ▼5.3785.48 ▲43.77
Posts /wp-admin/edit.php2,136 ▲503.12 ▲1.1440.39 ▲3.9646.42 ▲14.33
Add New Post /wp-admin/post-new.php6,611 ▲5,07822.84 ▼0.54868.42 ▲169.96141.76 ▲88.08
Media Library /wp-admin/upload.php1,473 ▲915.55 ▲1.25100.20 ▼8.2149.05 ▼0.27
Freemius Debug [v.2.4.3] /wp-admin/admin.php?page=freemius1,1092.9227.4926.44

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
You still need to fix the following
  • This plugin cannot be uninstalled
    • > Notice in wp-content/plugins/wpformify/libraries/freemius/includes/class-freemius.php+8575
    Undefined property: stdClass::$plugins
  • The plugin did not uninstall successfully, leaving 1 table in the database
    • wp_wpstp_stripe_customers
  • Zombie WordPress options detected upon uninstall: 13 options
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-posts
    • fs_gdpr
    • fs_debug_mode
    • theysaidso_admin_options
    • fs_accounts
    • widget_recent-comments
    • fs_active_plugins
    • wpep_refresh_token
    • ...

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 0% 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
Please fix the following items
  • 8× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/wpformify/views/frontend/saved_cards.php
    • > /wp-content/plugins/wpformify/modules/email_notifications/templates/new_user_email.php
    • > /wp-content/plugins/wpformify/assets/lib/vendor/stripe/stripe-php/update_certs.php
    • > /wp-content/plugins/wpformify/views/frontend/no-square-setup.php
    • > /wp-content/plugins/wpformify/modules/email_notifications/templates/payment_sent.php
    • > /wp-content/plugins/wpformify/assets/lib/vendor/stripe/stripe-php/build.php
    • > /wp-content/plugins/wpformify/modules/email_notifications/templates/payment_received.php
    • > /wp-content/plugins/wpformify/views/backend/form_builder_settings/tabs_list_and_switches.php
  • 244× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'Stripe\\ApiResource' not found in wp-content/plugins/wpformify/assets/lib/vendor/stripe/stripe-php/lib/Dispute.php:34
    • > PHP Fatal error
      Uncaught Error: Class 'Stripe\\ApiResource' not found in wp-content/plugins/wpformify/assets/lib/vendor/stripe/stripe-php/lib/ThreeDSecure.php:23
    • > PHP Fatal error
      Uncaught Error: Class 'Stripe\\ApiResource' not found in wp-content/plugins/wpformify/assets/lib/vendor/stripe/stripe-php/lib/Issuing/Authorization.php:40
    • > PHP Fatal error
      Uncaught Error: Class 'Stripe\\ApiResource' not found in wp-content/plugins/wpformify/assets/lib/vendor/stripe/stripe-php/lib/BillingPortal/Configuration.php:23
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/wpformify/views/backend/reports_download_popup.php:10
    • > PHP Fatal error
      Uncaught Error: Class 'Stripe\\ApiResource' not found in wp-content/plugins/wpformify/assets/lib/vendor/stripe/stripe-php/lib/Reporting/ReportRun.php:30
    • > PHP Fatal error
      require_once(): Failed opening required 'WPEP_ROOT_PATHmodules/payments/square_configuration.php' (include_path='.:/usr/share/php') in wp-content/plugins/wpformify/modules/payments/square_payments.php on line 15
    • > PHP Fatal error
      Uncaught Error: Class 'Stripe\\Service\\AbstractService' not found in wp-content/plugins/wpformify/assets/lib/vendor/stripe/stripe-php/lib/Service/PayoutService.php:7
    • > PHP Warning
      require_once(WPEP_ROOT_PATHassets/lib/square-sdk/autoload.php): failed to open stream: No such file or directory in wp-content/plugins/wpformify/modules/payments/square_configuration.php on line 14
    • > PHP Fatal error
      Uncaught Error: Class 'Stripe\\Exception\\ApiErrorException' not found in wp-content/plugins/wpformify/assets/lib/vendor/stripe/stripe-php/lib/Exception/ApiConnectionException.php:10

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser issues were found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
These attributes need your attention:
  • Screenshots: Add descriptions for screenshots #1, #10, #11, #2, #3, #4, #5, #6, #7, #8, #9 in wpformify/assets to your readme.txt
Please take inspiration from this readme.txt

wpformify/wp-formify.php 92% from 13 tests

The primary PHP file in "WPFormify – Stripe Payments with Form and Checkout" version 1.1.0 is used by WordPress to initiate all plugin functionality
You should first fix the following items:
  • Main file name: The principal plugin file should be the same as the plugin slug ("wpformify.php" instead of "wp-formify.php")

Code Analysis 3% from 3 tests

File types 0% from 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
These items require your attention
  • Even if your plugin relies on executable files (for example a companion app), never distribute executable files with your plugin
    • .crt - Security Certificate in Firefox, IE, Chrome, Safari
      • wp-content/plugins/wpformify/assets/lib/vendor/stripe/stripe-php/data/ca-certificates.crt
133,647 lines of code in 972 files:
LanguageFilesBlank linesComment linesLines of code
PHP90420,53189,19498,351
JSON70018,565
CSS191,44910410,098
JavaScript201,0655024,882
Markdown689201,543
SVG1302147
XML10031
make19027
YAML1003

PHP code 50% from 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
These items need your attention
  • Cyclomatic complexity of classes has to be reduced to less than 1000 (currently 2,910)
Cyclomatic complexity
Average complexity per logical line of code0.35
Average class complexity12.33
▷ Minimum class complexity1.00
▷ Maximum class complexity2,910.00
Average method complexity2.07
▷ Minimum method complexity1.00
▷ Maximum method complexity86.00
Code structure
Namespaces25
Interfaces6
Traits7
Classes758
▷ Abstract classes121.58%
▷ Concrete classes74698.42%
▷ Final classes00.00%
Methods8,207
▷ Static methods3394.13%
▷ Public methods7,80095.04%
▷ Protected methods440.54%
▷ Private methods3634.42%
Functions225
▷ Named functions21796.44%
▷ Anonymous functions83.56%
Constants837
▷ Global constants10712.78%
▷ Class constants73087.22%
▷ Public constants730100.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
23 PNG files occupy 0.31MB with 0.12MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/frontend/img/payment-done.png27.79KB12.08KB▼ 56.52%
libraries/freemius/assets/img/theme-icon.png10.97KB5.78KB▼ 47.37%
assets/backend/img/bg-1.png66.56KB73.06KB0.00%
assets/backend/img/placeholder-image.png5.68KB1.87KB▼ 67.03%
assets/backend/img/stripe-logo.png0.38KB0.27KB▼ 28.13%