90% wp-weixin-pay

Code Review | WP Weixin Pay

WordPress plugin WP Weixin Pay scored90%from 54 tests.

About plugin

  • Plugin page: wp-weixin-pay
  • 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 5, 2018
  • Latest release: May 16, 2020
  • Number of updates: 18
  • Update frequency: every 31.0 days
  • Top authors: frogerme (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

10+ active /5,978 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.13MB] [CPU: ▼8.08ms] Passed 4 tests

An overview of server-side resources used by WP Weixin Pay
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.61 ▲0.1440.79 ▲0.31
Dashboard /wp-admin3.45 ▲0.1047.60 ▼7.50
Posts /wp-admin/edit.php3.56 ▲0.2042.27 ▼4.34
Add New Post /wp-admin/post-new.php6.03 ▲0.1484.50 ▼20.78
Media Library /wp-admin/upload.php3.37 ▲0.1438.47 ▲7.61

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

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 16 new files
Database: no new tables, 7 new options
New WordPress options
theysaidso_admin_options
widget_recent-comments
widget_theysaidso_widget
db_upgraded
widget_recent-posts
can_compress_scripts
wp_weixin_pay_plugin_version

Browser metrics Passed 4 tests

WP Weixin Pay: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5413.29 ▼1.101.92 ▲0.2247.02 ▲6.09
Dashboard /wp-admin2,203 ▲184.84 ▼1.01111.18 ▲8.5942.87 ▼0.77
Posts /wp-admin/edit.php2,092 ▲31.96 ▼0.0335.74 ▼5.1632.46 ▼5.44
Add New Post /wp-admin/post-new.php1,523 ▲423.42 ▲0.40716.35 ▲95.9957.56 ▲6.01
Media Library /wp-admin/upload.php1,385 ▲34.25 ▲0.04108.57 ▲10.3145.97 ▲4.59

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
  • Zombie WordPress options detected upon uninstall: 7 options
    • widget_recent-posts
    • widget_recent-comments
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_theysaidso_widget
    • wp_weixin_pay_plugin_version
    • db_upgraded

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
Even though everything seems fine, this is not an exhaustive test

SRP Passed 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
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 a shallow check for browser errors
There were no browser issues found

Optimizations

Plugin configuration Passed 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: money transfer, wechat, wechatpay, wechat payments, payments...

wp-weixin-pay/wp-weixin-pay.php Passed 13 tests

The main PHP file in "WP Weixin Pay" ver. 1.3.15 adds more information about the plugin and also serves as the entry point for this plugin
43 characters long description:
Simple WeChat Pay integration for WordPress

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Everything looks great! No dangerous files found in this plugin1,526 lines of code in 13 files:
LanguageFilesBlank linesComment linesLines of code
PHP520942893
JavaScript4724278
CSS2210171
Markdown1550134
PO File1171750

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.31
Average class complexity108.00
▷ Minimum class complexity108.00
▷ Maximum class complexity108.00
Average method complexity3.89
▷ Minimum method complexity1.00
▷ Maximum method complexity14.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods37
▷ Static methods410.81%
▷ Public methods3081.08%
▷ Protected methods718.92%
▷ 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
No PNG files were detected