62% addon-paypal-with-contact-form-7

Code Review | Addon Paypal and Stripe With Contact Form 7

WordPress plugin Addon Paypal and Stripe With Contact Form 7 scored 62% from 54 tests.

About plugin

  • Plugin page: addon-paypal-with...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress version: 5.9.2
  • First release: Jan 3, 2020
  • Latest release: Feb 26, 2022
  • Number of updates: 13
  • Update frequency: every 60.5 days
  • Top authors: avdevelopers426 (100%)

Code review

54 tests

User reviews

6 reviews

Install metrics

500+ active / 2,878 total downloads


Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲2.26MB] [CPU: ▼284.74ms] Passed 4 tests

This is a short check of server-side resources used by Addon Paypal and Stripe With Contact Form 7
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /6.14 ▲2.6267.04 ▲14.17
Dashboard /wp-admin5.88 ▲2.4735.76 ▲1.75
Posts /wp-admin/edit.php5.94 ▲2.3036.67 ▼1.27
Add New Post /wp-admin/post-new.php8.65 ▲1.6895.74 ▼1,153.60
Media Library /wp-admin/upload.php5.88 ▲2.5998.09 ▲72.77
Paypal/Stripe Entries /wp-admin/admin.php?page=cfywpay_paypal_entries5.8535.04

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

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 241 new files
Database: 1 new table, no new options
New tables

Browser metrics Passed 4 tests

Addon Paypal and Stripe With Contact Form 7: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,963 ▲20919.06 ▲3.31214.68 ▲208.556.31 ▲3.83
Dashboard /wp-admin2,899 ▲386.25 ▲0.08114.01 ▼21.46155.13 ▼5.85
Posts /wp-admin/edit.php2,698 ▲43.25 ▲0.0164.17 ▼3.06131.24 ▼19.16
Add New Post /wp-admin/post-new.php1,641 ▼4916.61 ▼4.21389.26 ▼54.51141.57 ▼12.36
Media Library /wp-admin/upload.php1,702 ▲15.56 ▲0.07142.36 ▲0.87189.43 ▲4.45
Paypal/Stripe Entries /wp-admin/admin.php?page=cfywpay_paypal_entries1,1422.4453.3583.78

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • The plugin did not uninstall successfully, leaving 1 table in the database
    • wp_cf7wpay_forms

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Smoke test failed, please fix the following
    • > GET request to /wp-admin/admin.php?page=cfywpay_paypal_entries
    • > Warning in wp-includes/class-wp-hook.php+307
    call_user_func_array() expects parameter 1 to be a valid callback, class 'CF7WPAY' does not have a method 'OCCF7CAL_install_error'

SRP 0% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
The following issues need your attention
  • 3× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/addon-paypal-with-contact-form-7/includes/stripe_library/update_certs.php
    • > /wp-content/plugins/addon-paypal-with-contact-form-7/includes/stripe_library/build.php
    • > /wp-content/plugins/addon-paypal-with-contact-form-7/contact-form-7-with-paypal.php
  • 182× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'Stripe\\ApiResource' not found in wp-content/plugins/addon-paypal-with-contact-form-7/includes/stripe_library/lib/PaymentMethod.php:38
    • > PHP Fatal error
      Uncaught Error: Class 'Stripe\\Service\\AbstractServiceFactory' not found in wp-content/plugins/addon-paypal-with-contact-form-7/includes/stripe_library/lib/Service/Sigma/SigmaServiceFactory.php:10
    • > PHP Fatal error
      Uncaught Error: Class 'Stripe\\Service\\AbstractServiceFactory' not found in wp-content/plugins/addon-paypal-with-contact-form-7/includes/stripe_library/lib/Service/Issuing/IssuingServiceFactory.php:14
    • > PHP Fatal error
      Uncaught Error: Class 'Stripe\\Service\\AbstractService' not found in wp-content/plugins/addon-paypal-with-contact-form-7/includes/stripe_library/lib/Service/Issuing/DisputeService.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'Stripe\\ApiResource' not found in wp-content/plugins/addon-paypal-with-contact-form-7/includes/stripe_library/lib/Order.php:38
    • > PHP Fatal error
      Uncaught Error: Class 'Stripe\\Service\\AbstractService' not found in wp-content/plugins/addon-paypal-with-contact-form-7/includes/stripe_library/lib/Service/ApplePayDomainService.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'Stripe\\Service\\AbstractService' not found in wp-content/plugins/addon-paypal-with-contact-form-7/includes/stripe_library/lib/Service/WebhookEndpointService.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'Stripe\\StripeObject' not found in wp-content/plugins/addon-paypal-with-contact-form-7/includes/stripe_library/lib/OrderItem.php:16
    • > PHP Fatal error
      Uncaught Error: Class 'Stripe\\Service\\AbstractService' not found in wp-content/plugins/addon-paypal-with-contact-form-7/includes/stripe_library/lib/Service/TokenService.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'Stripe\\Service\\AbstractService' not found in wp-content/plugins/addon-paypal-with-contact-form-7/includes/stripe_library/lib/Service/EphemeralKeyService.php:5

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


Plugin configuration 87% from 29 tests

readme.txt 88% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
Attributes that require attention: The official readme.txt is a good inspiration

addon-paypal-with-contact-form-7/contact-form-7-with-paypal.php 85% from 13 tests

Analyzing the main PHP file in "Addon Paypal and Stripe With Contact Form 7" version 1.0
Please make the necessary changes and fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("addon-paypal-with-contact-form-7.php" instead of "contact-form-7-with-paypal.php")
  • Domain Path: The domain path points to an invalid folder, "/languages" does not exist

Code Analysis 5% from 3 tests

File types 0% from 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Almost there! Just fix the following issues
  • For security reasons, never distribute binary or executable files with your plugin
    • .crt - Security Certificate in Firefox, IE, Chrome, Safari
      • wp-content/plugins/addon-paypal-with-contact-form-7/includes/stripe_library/data/ca-certificates.crt
10,402 lines of code in 226 files:
LanguageFilesBlank linesComment linesLines of code

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.19
Average class complexity3.92
▷ Minimum class complexity1.00
▷ Maximum class complexity152.00
Average method complexity1.88
▷ Minimum method complexity1.00
▷ Maximum method complexity50.00
Code structure
▷ Abstract classes104.98%
▷ Concrete classes19195.02%
▷ Final classes00.00%
▷ Static methods15722.30%
▷ Public methods63690.34%
▷ Protected methods294.12%
▷ Private methods395.54%
▷ Named functions550.00%
▷ Anonymous functions550.00%
▷ Global constants142.08%
▷ Class constants66097.92%
▷ Public constants660100.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
7 PNG files occupy 0.06MB with 0.02MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
includes/image/minus_1.png0.91KB0.67KB▼ 27.06%
includes/image/star.png39.75KB10.35KB▼ 73.95%
includes/image/plus-circular-button.png0.94KB0.69KB▼ 26.59%
includes/image/plus-circular-button_1.png0.62KB0.38KB▼ 39.27%
includes/image/review.png15.87KB11.90KB▼ 25.01%