90% woo-wechatpay

Code Review | Payment gateway for WooCommerce - Woo WeChatPay

WordPress plugin Payment gateway for WooCommerce - Woo WeChatPay scored90%from 54 tests.

About plugin

  • Plugin page: woo-wechatpay
  • Plugin version: 1.3.15
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.9.5-5.4.1
  • WordPress version: 6.3.1
  • First release: Nov 2, 2018
  • Latest release: May 16, 2020
  • Number of updates: 23
  • Update frequency: every 24.4 days
  • Top authors: frogerme (100%)

Code review

54 tests

User reviews

5 reviews

Install metrics

100+ active /5,995 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
Installer ran successfully

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

Server-side resources used by Payment gateway for WooCommerce - Woo WeChatPay
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0142.23 ▲4.01
Dashboard /wp-admin3.31 ▼0.0347.51 ▼9.71
Posts /wp-admin/edit.php3.36 ▲0.0145.34 ▲0.24
Add New Post /wp-admin/post-new.php5.89 ▲0.0180.44 ▼25.91
Media Library /wp-admin/upload.php3.23 ▲0.0131.90 ▲1.99

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

A short overview of filesystem and database impact
The plugin installed successfully
Filesystem: 37 new files
Database: no new tables, 7 new options
New WordPress options
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-comments
db_upgraded
woo_wechatpay_plugin_version
can_compress_scripts
widget_recent-posts

Browser metrics Passed 4 tests

This is an overview of browser requirements for Payment gateway for WooCommerce - Woo WeChatPay
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,825 ▲5414.81 ▲0.142.08 ▲0.0943.92 ▲6.13
Dashboard /wp-admin2,203 ▲125.86 ▲1.0299.63 ▼1.4241.91 ▲4.49
Posts /wp-admin/edit.php2,089 ▼02.04 ▲0.0433.44 ▼3.0636.37 ▲0.05
Add New Post /wp-admin/post-new.php1,533 ▲1623.27 ▲5.67665.89 ▲17.0561.38 ▲11.54
Media Library /wp-admin/upload.php1,388 ▼34.15 ▼0.0694.95 ▼6.2743.96 ▲1.10

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • The uninstall procedure has failed, leaving 6 options in the database
    • can_compress_scripts
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_theysaidso_widget
    • widget_recent-posts

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP Passed 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
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
There were no browser issues found

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
5 plugin tags: weixin, wechat, wechatpay, payments, wechat payments

woo-wechatpay/woo-wechatpay.php Passed 13 tests

"Payment gateway for WooCommerce - Woo WeChatPay" version 1.3.15's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
38 characters long description:
Integrate Woocommerce with WeChat Pay.

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
Good job! No executable or dangerous file extensions detected4,208 lines of code in 25 files:
LanguageFilesBlank linesComment linesLines of code
PHP104561041,731
SVG1041,100
JavaScript814543721
Markdown11310326
PO File17696243
CSS416087

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.35
Average class complexity78.33
▷ Minimum class complexity5.00
▷ Maximum class complexity177.00
Average method complexity4.14
▷ Minimum method complexity1.00
▷ Maximum method complexity25.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods74
▷ Static methods56.76%
▷ Public methods5979.73%
▷ Protected methods1520.27%
▷ Private methods00.00%
Functions3
▷ Named functions266.67%
▷ Anonymous functions133.33%
Constants3
▷ Global constants3100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
4 PNG files occupy 0.04MB with 0.02MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/phone-bg.png21.40KB20.35KB▼ 4.88%
images/wechatpay-logo.png10.23KB5.53KB▼ 45.99%
images/browser-qr-footer.png7.00KB1.96KB▼ 72.05%
images/qr-placeholder.png3.30KB1.17KB▼ 64.69%