89% multiple-payment-solutions-for-woocommerce

Code Review | Multiple-Payment-Solutions-for-Woocommerce

WordPress plugin Multiple-Payment-Solutions-for-Woocommerce scored89%from 54 tests.

About plugin

  • Plugin page: multiple-payment-...
  • Plugin version: 1.03
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-6.0.2
  • WordPress version: 6.3.1
  • First release: Jan 3, 2020
  • Latest release: Sep 22, 2022
  • Number of updates: 18
  • Update frequency: every 55.9 days
  • Top authors: weblizar (72.22%)vibhorp (33.33%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active /4,287 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Install script ran successfully

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

Server-side resources used by Multiple-Payment-Solutions-for-Woocommerce
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0239.37 ▼4.68
Dashboard /wp-admin3.32 ▼0.0247.56 ▼14.34
Posts /wp-admin/edit.php3.37 ▲0.0253.47 ▲3.46
Add New Post /wp-admin/post-new.php5.90 ▲0.0291.99 ▲6.45
Media Library /wp-admin/upload.php3.25 ▲0.0235.17 ▼4.45

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

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 32 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_recent-comments
db_upgraded
widget_recent-posts
widget_theysaidso_widget
theysaidso_admin_options

Browser metrics Passed 4 tests

This is an overview of browser requirements for Multiple-Payment-Solutions-for-Woocommerce
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,796 ▲4614.73 ▲0.141.79 ▼0.0339.23 ▼8.45
Dashboard /wp-admin2,205 ▲285.62 ▼0.0493.75 ▼3.4343.74 ▲4.57
Posts /wp-admin/edit.php2,110 ▲102.03 ▲0.0339.49 ▼3.5039.23 ▼0.60
Add New Post /wp-admin/post-new.php1,538 ▲1023.17 ▲0.05643.14 ▲12.6348.41 ▼0.92
Media Library /wp-admin/upload.php1,404 ▲44.19 ▲0.0199.76 ▼7.2743.91 ▼1.27

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
Please fix the following items
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_theysaidso_widget
    • widget_recent-comments
    • widget_recent-posts
    • can_compress_scripts
    • theysaidso_admin_options
    • db_upgraded

Smoke tests Passed 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 Passed 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
Looking good! No server-side errors or output on direct access of PHP files

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
These attributes need your attention:
  • Tags: Please reduce the number of tags, currently 16 tag instead of maximum 10
The official readme.txt is a good inspiration

multiple-payment-solutions-for-woocommerce/multiple-payment-solutions-for-woocommerce.php 92% from 13 tests

The principal PHP file in "Multiple-Payment-Solutions-for-Woocommerce" v. 1.03 is loaded by WordPress automatically on each request
Please make the necessary changes and fix the following:
  • Description: Please don't use more than 140 characters for the plugin description (currently 214 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Success! There were no dangerous files found in this plugin2,428 lines of code in 18 files:
LanguageFilesBlank linesComment linesLines of code
PHP92032171,750
PO File1207249535
SVG807143

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.22
Average class complexity22.33
▷ Minimum class complexity9.00
▷ Maximum class complexity42.00
Average method complexity3.00
▷ Minimum method complexity1.00
▷ Maximum method complexity13.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes6
▷ Abstract classes00.00%
▷ Concrete classes6100.00%
▷ Final classes00.00%
Methods64
▷ Static methods1828.12%
▷ Public methods5687.50%
▷ Protected methods00.00%
▷ Private methods812.50%
Functions10
▷ Named functions10100.00%
▷ Anonymous functions00.00%
Constants5
▷ Global constants5100.00%
▷ Class constants00.00%
▷ Public constants00.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
8 PNG files occupy 0.09MB with 0.04MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/cf-mailer-logo.png7.66KB3.13KB▼ 59.19%
assets/images/stripe.png5.31KB2.78KB▼ 47.66%
assets/images/paytm_icon.png1.45KB0.52KB▼ 64.01%
assets/images/logo.png56.54KB24.41KB▼ 56.83%
assets/images/icon.png3.31KB2.51KB▼ 24.01%