89% chinese-wechat-pay-for-american-merchants

Code Review | Chinese WeChat Pay for American merchants(微信支付美国版)

WordPress plugin Chinese WeChat Pay for American merchants(微信支付美国版) scored 89% from 54 tests.

About plugin

  • Plugin page: chinese-wechat-pa...
  • Plugin version: 1.6.5
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.3-6.1
  • WordPress version: 6.3.1
  • First release: Feb 2, 2021
  • Latest release: Feb 26, 2023
  • Number of updates: 20
  • Update frequency: every 37.7 days
  • Top authors: noveltypay (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 499 total downloads

Benchmarks

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 gracefully, with no errors

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

A check of server-side resources used by Chinese WeChat Pay for American merchants(微信支付美国版)
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0047.11 ▲0.61
Dashboard /wp-admin3.31 ▲0.0051.78 ▼2.09
Posts /wp-admin/edit.php3.36 ▲0.0053.61 ▲1.99
Add New Post /wp-admin/post-new.php5.89 ▲0.0099.21 ▼1.39
Media Library /wp-admin/upload.php3.23 ▲0.0037.22 ▲2.50

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

Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 8 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
can_compress_scripts
theysaidso_admin_options
widget_recent-posts
widget_theysaidso_widget
db_upgraded

Browser metrics Passed 4 tests

Checking browser requirements for Chinese WeChat Pay for American merchants(微信支付美国版)
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲1113.66 ▼0.762.03 ▲0.0240.67 ▼5.07
Dashboard /wp-admin2,206 ▼04.85 ▼1.06107.49 ▼0.5542.23 ▲4.58
Posts /wp-admin/edit.php2,092 ▲32.03 ▲0.0040.53 ▲5.9434.36 ▲0.15
Add New Post /wp-admin/post-new.php1,542 ▲2818.33 ▲0.68627.86 ▼64.0455.10 ▼3.10
Media Library /wp-admin/upload.php1,391 ▲34.21 ▲0.0295.28 ▼8.9641.66 ▼3.66

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
It is recommended to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-comments
    • widget_recent-posts
    • theysaidso_admin_options
    • db_upgraded
    • widget_theysaidso_widget
    • can_compress_scripts

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
Everything seems fine, however this is by no means an exhaustive test

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 93% from 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
6 plugin tags: wechat, chinese payment, woocommerce, wechat pay, noveltypay...

chinese-wechat-pay-for-american-merchants/novelty_wechatpay_init.php 85% from 13 tests

This is the main PHP file of "Chinese WeChat Pay for American merchants(微信支付美国版)" version 1.6.5, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
You should first fix the following items:
  • Description: Keep the plugin description shorter than 140 characters (currently 215 characters long)
  • Main file name: Name the main plugin file the same as the plugin slug ("chinese-wechat-pay-for-american-merchants.php" instead of "novelty_wechatpay_init.php")

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
Good job! No executable or dangerous file extensions detected1,168 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript281128752
PHP499137416

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.40
Average class complexity22.00
▷ Minimum class complexity3.00
▷ Maximum class complexity41.00
Average method complexity4.23
▷ Minimum method complexity1.00
▷ Maximum method complexity21.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods13
▷ Static methods00.00%
▷ Public methods13100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions14
▷ Named functions14100.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
1 PNG file occupies 0.01MB with 0.01MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
images/logo.png7.57KB2.43KB▼ 67.96%