78% weixin-helper

Code Review | 微信群发助手(WeChat Helper)

WordPress plugin 微信群发助手(WeChat Helper) scored78%from 54 tests.

About plugin

  • Plugin page: weixin-helper
  • Plugin version: 1.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-1.0.1
  • WordPress version: 6.3.1
  • First release: Jun 16, 2015
  • Latest release: Mar 16, 2021
  • Number of updates: 10
  • Update frequency: every 210.3 days
  • Top authors: smyx (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /4,101 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Install script ran successfully

Server metrics [RAM: ▲0.06MB] [CPU: ▼7.09ms] Passed 4 tests

A check of server-side resources used by 微信群发助手(WeChat Helper)
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0636.26 ▲1.51
Dashboard /wp-admin3.38 ▲0.0345.98 ▼12.03
Posts /wp-admin/edit.php3.43 ▲0.0747.22 ▼1.93
Add New Post /wp-admin/post-new.php5.96 ▲0.0780.08 ▼13.07
Media Library /wp-admin/upload.php3.30 ▲0.0735.05 ▼1.33
手动群发 /wp-admin/admin.php?page=weixin-helper&tag=hand3.2428.91
General Settings /wp-admin/admin.php?page=weixin-helper3.2429.77
群发记录 /wp-admin/admin.php?page=weixin-helper-log3.2430.06

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

A short overview of filesystem and database impact
There were no storage issued detected upon installing this plugin
Filesystem: 8 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_theysaidso_widget
widget_recent-posts
can_compress_scripts
theysaidso_admin_options
widget_recent-comments

Browser metrics Passed 4 tests

A check of browser resources used by 微信群发助手(WeChat Helper)
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,830 ▲9513.36 ▼1.281.57 ▼0.1840.35 ▼8.57
Dashboard /wp-admin2,233 ▲454.88 ▼1.0395.73 ▼10.6779.38 ▲37.35
Posts /wp-admin/edit.php2,125 ▲362.01 ▲0.0139.06 ▲2.8341.10 ▲5.50
Add New Post /wp-admin/post-new.php1,550 ▲3118.47 ▼4.91656.14 ▲19.0362.72 ▲12.70
Media Library /wp-admin/upload.php1,421 ▲334.23 ▲0.1195.45 ▼2.9175.31 ▲33.05
手动群发 /wp-admin/admin.php?page=weixin-helper&tag=hand1,1422.1925.9578.78
General Settings /wp-admin/admin.php?page=weixin-helper1,6632.1925.0276.12
群发记录 /wp-admin/admin.php?page=weixin-helper-log7892.0127.1631.63

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_recent-posts
    • db_upgraded
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-comments

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Almost there, just fix the following server-side errors
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=weixin-helper
    • > Notice in wp-content/plugins/weixin-helper/weixin-helper.php+71
    Undefined variable: helper
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=weixin-helper&tag=hand
    • > Notice in wp-content/plugins/weixin-helper/weixin-helper.php+343
    Undefined variable: type
  • 9 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=weixin-helper&tag=hand
    • > Notice in wp-content/plugins/weixin-helper/weixin-helper.php+365
    Undefined variable: msg
    • > GET request to /wp-admin/admin.php?page=weixin-helper&tag=hand
    • > Notice in wp-content/plugins/weixin-helper/weixin-helper.php+361
    Undefined variable: content
    • > GET request to /wp-admin/admin.php?page=weixin-helper&tag=hand
    • > Notice in wp-content/plugins/weixin-helper/weixin-helper.php+370
    Undefined variable: site0
    • > GET request to /wp-admin/admin.php?page=weixin-helper&tag=hand
    • > Notice in wp-content/plugins/weixin-helper/weixin-helper.php+370
    Undefined variable: material
    • > GET request to /wp-admin/admin.php?page=weixin-helper&tag=hand
    • > Notice in wp-content/plugins/weixin-helper/weixin-helper.php+371
    Undefined variable: site2
    • > GET request to /wp-admin/admin.php?page=weixin-helper&tag=hand
    • > Notice in wp-content/plugins/weixin-helper/weixin-helper.php+372
    Undefined variable: site1
  • 8 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=weixin-helper
    • > Notice in wp-content/plugins/weixin-helper/weixin-helper.php+308
    Undefined index: weixin
    • > GET request to /wp-admin/admin.php?page=weixin-helper
    • > Notice in wp-content/plugins/weixin-helper/weixin-helper.php+106
    Undefined index: item
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=weixin-helper
    • > Notice in wp-content/plugins/weixin-helper/weixin-helper.php+115
    Undefined index: nopic
    • > GET request to /wp-admin/admin.php?page=weixin-helper
    • > Notice in wp-content/plugins/weixin-helper/weixin-helper.php+117
    Undefined index: image
    • > GET request to /wp-admin/admin.php?page=weixin-helper
    • > Notice in wp-content/plugins/weixin-helper/weixin-helper.php+121
    Undefined index: top
  • 5 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=weixin-helper
    • > Notice in wp-content/plugins/weixin-helper/weixin-helper.php+130
    Undefined index: content
    • > GET request to /wp-admin/admin.php?page=weixin-helper
    • > Notice in wp-content/plugins/weixin-helper/weixin-helper.php+135
    Undefined index: bottom
  • 12 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=weixin-helper
    • > Notice in wp-content/plugins/weixin-helper/weixin-helper.php+228
    Trying to access array offset on value of type null
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=weixin-helper
    • > Notice in wp-content/plugins/weixin-helper/weixin-helper.php+228
    Undefined variable: mp_users
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=weixin-helper
    • > Notice in wp-content/plugins/weixin-helper/weixin-helper.php+178
    Undefined index: comment
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=weixin-helper
    • > Notice in wp-content/plugins/weixin-helper/weixin-helper.php+309
    Undefined index: weibo
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=weixin-helper
    • > Notice in wp-content/plugins/weixin-helper/weixin-helper.php+310
    Undefined index: yixin
    • > GET request to /wp-admin/admin.php?page=weixin-helper
    • > Notice in wp-content/plugins/weixin-helper/weixin-helper.php+247
    Undefined index: open
  • 8 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=weixin-helper
    • > Notice in wp-content/plugins/weixin-helper/weixin-helper.php+256
    Undefined index: date
  • 12 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=weixin-helper
    • > Notice in wp-content/plugins/weixin-helper/weixin-helper.php+272
    Undefined index: min
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=weixin-helper
    • > Notice in wp-content/plugins/weixin-helper/weixin-helper.php+282
    Undefined index: nopost
  • 4 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=weixin-helper
    • > Notice in wp-content/plugins/weixin-helper/weixin-helper.php+291
    Undefined index: post
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=weixin-helper
    • > Notice in wp-content/plugins/weixin-helper/weixin-helper.php+298
    Undefined index: send
    • > GET request to /wp-admin/admin.php?page=weixin-helper
    • > Notice in wp-content/plugins/weixin-helper/weixin-helper.php+303
    Undefined index: email
    • > GET request to /wp-admin/admin.php?page=weixin-helper-log
    • > Warning in wp-includes/class-wp-hook.php+310
    call_user_func_array() expects parameter 1 to be a valid callback, function 'weixin_helper_log_do_page' not found or invalid function name

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please fix the following
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugins_url() in wp-content/plugins/weixin-helper/weixin-helper.php:12

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 88% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
These attributes need to be fixed:
  • Screenshots: These screenshots need descriptions #1, #2, #3 in weixin-helper/assets to your readme.txt
  • Plugin Name: Please specify the plugin name on the first line ( === weixin-helper === )
You can take inspiration from this readme.txt

weixin-helper/weixin-helper.php Passed 13 tests

The entry point to "微信群发助手(WeChat Helper)" version 1.0.1 is a PHP file that has certain tags in its header comment area
101 characters long description:
使用微信公众号、微博粉丝服务的[高级群发接口]实现WordPress自动群发给用户

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Success! There were no dangerous files found in this plugin660 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP139424
PO File2198415236

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.29
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.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
2 PNG files occupy 0.01MB with 0.00MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/weixin-logo.png1.50KB0.55KB▼ 63.18%
images/icon_weixin.png4.15KB1.33KB▼ 68.03%