84% wc-webmoney

Code Review | Webmoney - payment gateway for WooCommerce

WordPress plugin Webmoney - payment gateway for WooCommerce scored84%from 54 tests.

About plugin

  • Plugin page: wc-webmoney
  • Plugin version: 2.0.1.1
  • PHP compatiblity: 5.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-5.2
  • WordPress version: 6.3.1
  • First release: Jan 9, 2016
  • Latest release: Oct 5, 2019
  • Number of updates: 49
  • Update frequency: every 39.1 days
  • Top authors: Mofsy (100%)

Code review

54 tests

User reviews

5 reviews

Install metrics

500+ active /13,790 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▼0.00MB] [CPU: ▼9.21ms] Passed 4 tests

A check of server-side resources used by Webmoney - payment gateway for WooCommerce
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0139.93 ▼4.74
Dashboard /wp-admin3.31 ▼0.0348.10 ▼16.75
Posts /wp-admin/edit.php3.36 ▲0.0145.17 ▼7.46
Add New Post /wp-admin/post-new.php5.89 ▲0.0187.96 ▼7.89
Media Library /wp-admin/upload.php3.23 ▲0.0138.68 ▲2.82

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 115 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
can_compress_scripts
widget_theysaidso_widget
widget_recent-comments
widget_recent-posts
theysaidso_admin_options

Browser metrics Passed 4 tests

Checking browser requirements for Webmoney - payment gateway for WooCommerce
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5414.44 ▲0.001.83 ▲0.0943.22 ▲0.77
Dashboard /wp-admin2,206 ▲154.93 ▼0.18104.10 ▲1.2537.37 ▼5.95
Posts /wp-admin/edit.php2,089 ▼02.06 ▲0.0337.49 ▲1.3534.90 ▼2.92
Add New Post /wp-admin/post-new.php1,533 ▲1323.07 ▼0.10761.35 ▲159.4460.74 ▲7.77
Media Library /wp-admin/upload.php1,385 ▼34.12 ▼0.02109.20 ▲5.7346.52 ▲4.54

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

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Good news, no errors were detected

SRP 50% 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
Almost there! Just fix the following items
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Class 'WC_Payment_Gateway' not found in wp-content/plugins/wc-webmoney/includes/class-wc-webmoney-method.php:9

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)
No browser errors were detected

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
Attributes that need to be fixed:
  • Screenshots: Add images for these screenshots: #1 (One), #2 (Two), #3 (Three)
The official readme.txt is a good inspiration

wc-webmoney/wc-webmoney.php Passed 13 tests

"Webmoney - payment gateway for WooCommerce" version 2.0.1.1's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
71 characters long description:
Allows you to use Webmoney payment gateway with the WooCommerce plugin.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Everything looks great! No dangerous files found in this plugin6,934 lines of code in 105 files:
LanguageFilesBlank linesComment linesLines of code
Sass951,3231,1315,483
PHP72909851,122
PO File1134172319
XML1009
CSS1011

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.24
Average class complexity26.00
▷ Minimum class complexity5.00
▷ Maximum class complexity57.00
Average method complexity2.04
▷ Minimum method complexity1.00
▷ Maximum method complexity31.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes133.33%
Methods72
▷ Static methods11.39%
▷ Public methods7198.61%
▷ Protected methods00.00%
▷ Private methods11.39%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants4100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
1 PNG file occupies 0.14MB with 0.09MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/img/wc-webmoney-premium-icon.png142.30KB47.66KB▼ 66.51%