89% xunhu-alipay-payment-for-woocommerce

Code Review | WordPress WooCommerce支付宝个人版

WordPress plugin WordPress WooCommerce支付宝个人版 scored89%from 54 tests.

About plugin

  • Plugin page: xunhu-alipay-paym...
  • Plugin version: 1.0.7
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-5.1.1
  • WordPress version: 6.3.1
  • First release: Dec 26, 2016
  • Latest release: Jul 12, 2019
  • Number of updates: 35
  • Update frequency: every 26.5 days
  • Top authors: xunhuweb (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

200+ active /13,928 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 successfully, without throwing any errors or notices

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

An overview of server-side resources used by WordPress WooCommerce支付宝个人版
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0239.65 ▼4.46
Dashboard /wp-admin3.33 ▼0.0248.94 ▼17.46
Posts /wp-admin/edit.php3.38 ▲0.0249.66 ▲0.55
Add New Post /wp-admin/post-new.php5.91 ▲0.0297.20 ▼8.05
Media Library /wp-admin/upload.php3.25 ▲0.0239.64 ▲3.84

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

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 8 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
db_upgraded
can_compress_scripts
widget_recent-comments
theysaidso_admin_options
widget_recent-posts

Browser metrics Passed 4 tests

This is an overview of browser requirements for WordPress WooCommerce支付宝个人版
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲314.25 ▼0.041.68 ▼0.4144.52 ▼5.45
Dashboard /wp-admin2,198 ▲215.60 ▼0.1093.45 ▼3.5440.36 ▼4.79
Posts /wp-admin/edit.php2,100 ▲32.02 ▲0.0043.20 ▲6.5735.97 ▲2.23
Add New Post /wp-admin/post-new.php1,526 ▼517.67 ▼5.32739.19 ▲99.1061.69 ▲3.50
Media Library /wp-admin/upload.php1,397 ▼34.26 ▲0.05113.19 ▲7.8147.02 ▼0.67

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
    • theysaidso_admin_options
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-posts
    • can_compress_scripts
    • widget_recent-comments

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 no errors were found, this is by no means an exhaustive test

SRP Passed 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
No output text or server-side errors detected on direct access of PHP files

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser issues were found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
Attributes that need to be fixed:
  • Screenshots: These screenshots do not have images: #1 (alipay settings page), #2 (Checkout with option for alipay payment.), #3 (Order pay screen, including QR code of alipay and payment amount.), #4 (Pay screen in alipay), #5 (alipay mobile Screenshots)
Please take inspiration from this readme.txt

xunhu-alipay-payment-for-woocommerce/init.php 85% from 13 tests

"WordPress WooCommerce支付宝个人版" version 1.0.7's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
The following require your attention:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("xunhu-alipay-payment-for-woocommerce.php" instead of "init.php")
  • Text Domain: The text domain should only use lowercase characters and dashes

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
No dangerous file extensions were detected526 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP26243408
Markdown126061
PO File1182057

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.41
Average class complexity51.00
▷ Minimum class complexity51.00
▷ Maximum class complexity51.00
Average method complexity4.85
▷ Minimum method complexity1.00
▷ Maximum method complexity14.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods13
▷ Static methods00.00%
▷ Public methods1076.92%
▷ Protected methods00.00%
▷ Private methods323.08%
Functions2
▷ Named functions150.00%
▷ Anonymous functions150.00%
Constants6
▷ Global constants6100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
1 PNG file occupies 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
images/logo/alipay.png3.41KB2.44KB▼ 28.24%