68% push-message-to-wechat

Code Review | Push Message To WeChat

WordPress plugin Push Message To WeChat scored68%from 54 tests.

About plugin

  • Plugin page: push-message-to-w...
  • Plugin version: 2.0.0
  • PHP compatiblity: 5.6.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.2-5.3.2
  • WordPress version: 6.3.1
  • First release: Mar 7, 2020
  • Latest release: Mar 7, 2020
  • Number of updates: 9
  • Update frequency: every 5.3 days
  • Top authors: shenyanzhi (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /562 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Install script ran successfully

Server metrics [RAM: ▼0.90MB] [CPU: ▼34.19ms] Passed 4 tests

Analyzing server-side resources used by Push Message To WeChat
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0637.71 ▼3.64
Dashboard /wp-admin3.04 ▼0.2623.76 ▼25.91
Posts /wp-admin/edit.php3.05 ▼0.3125.46 ▼28.81
Add New Post /wp-admin/post-new.php3.05 ▼2.8424.41 ▼71.53
Media Library /wp-admin/upload.php3.05 ▼0.1823.26 ▼10.51
Push To WeChat /wp-admin/options-general.php?page=Push_To_WeChat3.0524.57

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

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

Browser metrics Passed 4 tests

Checking browser requirements for Push Message To WeChat
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,793 ▲3214.10 ▼0.461.57 ▼0.1339.38 ▼1.87
Dashboard /wp-admin2,199 ▲225.57 ▲0.0589.01 ▼1.9937.90 ▼2.25
Posts /wp-admin/edit.php2,114 ▲142.00 ▼0.0138.44 ▼1.2252.42 ▲15.72
Add New Post /wp-admin/post-new.php1,531 ▲523.25 ▼0.39686.57 ▼9.0855.30 ▼3.24
Media Library /wp-admin/upload.php1,404 ▲44.29 ▲0.10102.37 ▼2.5345.60 ▲0.17
Push To WeChat /wp-admin/options-general.php?page=Push_To_WeChat8561.9923.1573.03

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
It is recommended to fix the following
  • The plugin did not uninstall gracefully
    • > User notice in wp-includes/functions.php+5905
    Function add_submenu_page was called incorrectly. The seventh parameter passed to add_submenu_page() should be numeric representing menu position. Please see Debugging in WordPress for more information. (This message was added in version 5.3.0.)
  • Zombie WordPress options were found after uninstall: 6 options
    • theysaidso_admin_options
    • widget_recent-comments
    • can_compress_scripts
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-posts

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Almost there, just fix the following server-side errors
    • > GET request to /wp-admin/options-general.php?page=Push_To_WeChat
    • > User notice in wp-includes/functions.php+5905
    Function add_submenu_page was called incorrectly. The seventh parameter passed to add_submenu_page() should be numeric representing menu position. Please see Debugging in WordPress for more information. (This message was added in version 5.3.0.)

SRP 50% from 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
Almost there! Just fix the following items
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/push-message-to-wechat/push-message-to-wechat.php:12

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

readme.txt 94% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
Please fix the following attributes:
  • Screenshots: These screenshots have no corresponding images in /assets: #1 (screenshot-1.png), #2 (screenshot-2.png)
You can take inspiration from this readme.txt

push-message-to-wechat/push-message-to-wechat.php Passed 13 tests

"Push Message To WeChat" version 2.0.0's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
74 characters long description:
基于PushBear服务提供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
Success! There were no dangerous files found in this plugin402 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP24040350
Markdown134052

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.35
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%
Functions15
▷ Named functions15100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
3 PNG files occupy 0.30MB with 0.18MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
push-wordpress-to-wechat.png13.79KB7.27KB▼ 47.29%
screenshot-2.png42.27KB12.90KB▼ 69.49%
screenshot-1.png248.93KB78.49KB▼ 68.47%