63% multipay

Code Review | MultiPay

WordPress plugin MultiPay scored 63% from 54 tests.

About plugin

  • Plugin page: multipay
  • Plugin version: 1.4.4
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-5.0.3
  • WordPress version: 5.9.2
  • First release: Nov 4, 2016
  • Latest release: Jan 31, 2019
  • Number of updates: 40
  • Update frequency: every 22.8 days
  • Top authors: etalented (55%)aerin (47.5%)

Code review

54 tests

User reviews

3 reviews

Install metrics

50+ active / 2,536 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Install script ran successfully

Server metrics [RAM: ▲0.76MB] [CPU: ▼293.91ms] Passed 4 tests

This is a short check of server-side resources used by MultiPay
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /4.41 ▲0.8927.91 ▼28.34
Dashboard /wp-admin4.17 ▲0.7644.30 ▲6.84
Posts /wp-admin/edit.php4.39 ▲0.7547.04 ▲8.30
Add New Post /wp-admin/post-new.php7.69 ▲0.72111.33 ▼1,156.00
Media Library /wp-admin/upload.php4.11 ▲0.8130.66 ▲1.86
Transactions /wp-admin/admin.php?page=multipay-messages3.9926.98
Settings /wp-admin/admin.php?page=multipay-settings4.0935.35

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

Filesystem and database footprint
This plugin was installed successfully
Filesystem: 107 new files
Database: no new tables, 1 new option
New WordPress options
widget_qp_widget

Browser metrics Passed 4 tests

A check of browser resources used by MultiPay
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,841 ▲8716.01 ▲0.416.39 ▲0.223.78 ▲0.92
Dashboard /wp-admin2,922 ▲646.13 ▼0.03123.24 ▼18.93163.52 ▼0.83
Posts /wp-admin/edit.php2,725 ▲373.24 ▲0.0063.78 ▼1.03135.50 ▼5.29
Add New Post /wp-admin/post-new.php1,712 ▼4020.61 ▼0.27429.80 ▼35.99155.61 ▼5.19
Media Library /wp-admin/upload.php1,732 ▲345.49 ▼0.02137.98 ▼1.03193.20 ▲5.61
Transactions /wp-admin/admin.php?page=multipay-messages1,0352.3855.46102.02
Settings /wp-admin/admin.php?page=multipay-settings1,6314.9073.67178.34

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
These items require your attention
  • Zombie WordPress options were found after uninstall: 1 option
    • widget_qp_widget

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Smoke test failed, please fix the following
    • > GET request to /wp-admin/admin.php?page=multipay-messages
    • > Deprecated in wp-content/plugins/multipay/multipay.php+97
    Non-static method MultiPay_Messages::output() should not be called statically
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=multipay-settings
    • > Notice in wp-content/plugins/multipay/settings.php+210
    Trying to access array offset on value of type bool
    • > GET request to /wp-admin/admin.php?page=multipay-settings
    • > Deprecated in wp-content/plugins/multipay/multipay.php+91
    Non-static method MultiPay_Settings::output() should not be called statically
    • > GET request to /wp-admin/admin.php?page=multipay-settings
    • > Deprecated in wp-content/plugins/multipay/settings.php+26
    Non-static method MultiPay_Settings::admin_tabs() should not be called statically
    • > GET request to /wp-admin/admin.php?page=multipay-settings
    • > Deprecated in wp-content/plugins/multipay/settings.php+29
    Non-static method MultiPay_Settings::setup() should not be called statically

SRP 50% 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
  • 62× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/multipay/PaymentsAPI/bootstrap.php:17
    • > PHP Fatal error
      Uncaught Error: Class 'Stripe\\ApiResource' not found in wp-content/plugins/multipay/PaymentsAPI/stripe/lib/Coupon.php:10
    • > PHP Fatal error
      Uncaught Error: Class 'Stripe\\ApiResource' not found in wp-content/plugins/multipay/PaymentsAPI/stripe/lib/Customer.php:27
    • > PHP Fatal error
      Uncaught Error: Class 'Stripe\\ApiResource' not found in wp-content/plugins/multipay/PaymentsAPI/stripe/lib/Subscription.php:10
    • > PHP Fatal error
      Uncaught Error: Class 'Stripe\\ApiResource' not found in wp-content/plugins/multipay/PaymentsAPI/stripe/lib/Source.php:10
    • > PHP Fatal error
      Uncaught Error: Class 'Stripe\\ApiResource' not found in wp-content/plugins/multipay/PaymentsAPI/stripe/lib/SubscriptionItem.php:10
    • > PHP Fatal error
      Uncaught Error: Class 'Stripe\\Error\\Base' not found in wp-content/plugins/multipay/PaymentsAPI/stripe/lib/Error/Card.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'PaymentBase' not found in wp-content/plugins/multipay/PaymentsAPI/paypal/PaypalPayments.class.php:12
    • > PHP Fatal error
      Uncaught Error: Class 'Stripe\\SingletonApiResource' not found in wp-content/plugins/multipay/PaymentsAPI/stripe/lib/Balance.php:15
    • > PHP Fatal error
      Uncaught Error: Class 'Stripe\\ApiResource' not found in wp-content/plugins/multipay/PaymentsAPI/stripe/lib/BalanceTransaction.php:25

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Please take a look at the following user-side issues
    • > GET request to /wp-admin/admin.php?page=multipay-settings
    • > Network (severe)
    https://assets-cdn.github.com/images/modules/logos_page/GitHub-Logo.png - Failed to load resource: the server responded with a status of 404 ()
    • > GET request to /wp-admin/admin.php?page=multipay-settings
    • > Network (severe)
    http://www.etalented.co.uk/bl/bl.js - Failed to load resource: net::ERR_CONNECTION_RESET

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
9 plugin tags: ecommerce, paypal, sell, stripe, store...

multipay/multipay.php Passed 13 tests

Analyzing the main PHP file in "MultiPay" version 1.4.4
76 characters long description:
MultiPay is a free eCommerce plugin that allows you to sell anything, simply

Code Analysis 5% from 3 tests

File types 0% from 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
It is important to fix the following items
  • You should never include executable (binary) or otherwise dangerous files in your plugin
    • .crt - Security Certificate in Firefox, IE, Chrome, Safari
      • wp-content/plugins/multipay/PaymentsAPI/stripe/data/ca-certificates.crt
8,891 lines of code in 101 files:
LanguageFilesBlank linesComment linesLines of code
PHP911,2042,2437,799
JavaScript6209174720
CSS3290303
Markdown123069

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.35
Average class complexity8.62
▷ Minimum class complexity1.00
▷ Maximum class complexity184.00
Average method complexity2.46
▷ Minimum method complexity1.00
▷ Maximum method complexity44.00
Code structure
Namespaces5
Interfaces3
Traits0
Classes81
▷ Abstract classes78.64%
▷ Concrete classes7491.36%
▷ Final classes00.00%
Methods431
▷ Static methods15736.43%
▷ Public methods39391.18%
▷ Protected methods112.55%
▷ Private methods276.26%
Functions57
▷ Named functions5698.25%
▷ Anonymous functions11.75%
Constants14
▷ Global constants642.86%
▷ Class constants857.14%
▷ Public constants8100.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
2 PNG files occupy 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
done.png4.30KB2.81KB▼ 34.61%
PaymentsAPI/stripe/data/test.png0.09KB0.09KB0.00%