80% wp-weixin-broadcast

Code Review | WP Weixin Broadcast

WordPress plugin WP Weixin Broadcast scored80%from 54 tests.

About plugin

  • Plugin page: wp-weixin-broadcast
  • 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: Jan 19, 2020
  • Latest release: May 16, 2020
  • Number of updates: 11
  • Update frequency: every 27.0 days
  • Top authors: frogerme (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,011 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Install script ran successfully

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

Server-side resources used by WP Weixin Broadcast
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0136.32 ▼9.03
Dashboard /wp-admin3.31 ▲0.0143.57 ▼9.66
Posts /wp-admin/edit.php3.36 ▲0.0145.51 ▼0.03
Add New Post /wp-admin/post-new.php5.89 ▲0.0194.62 ▲0.06
Media Library /wp-admin/upload.php3.23 ▲0.0131.84 ▼0.71

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

Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 98 new files
Database: 1 new table, 7 new options
New tables
wp_wp_weixin_broadcast_message_logs
New WordPress options
widget_recent-comments
widget_theysaidso_widget
widget_recent-posts
theysaidso_admin_options
can_compress_scripts
db_upgraded
wp_weixin_broadcast_plugin_version

Browser metrics Passed 4 tests

This is an overview of browser requirements for WP Weixin Broadcast
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5413.31 ▼0.993.96 ▲1.8141.64 ▼2.10
Dashboard /wp-admin2,203 ▲124.83 ▼0.06107.25 ▼1.6040.41 ▼5.53
Posts /wp-admin/edit.php2,089 ▼02.04 ▲0.0139.04 ▼1.0035.26 ▼0.11
Add New Post /wp-admin/post-new.php1,537 ▲2318.28 ▲0.68594.96 ▼85.1957.65 ▲2.81
Media Library /wp-admin/upload.php1,388 ▲34.22 ▲0.0696.60 ▼5.9542.27 ▼0.68

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
Please fix the following items
  • This plugin did not uninstall without warnings or errors
    • > User notice in wp-includes/functions.php+5905
    Function wpdb::prepare was called incorrectly. The query argument of wpdb::prepare() must have a placeholder. Please see Debugging in WordPress for more information. (This message was added in version 3.9.0.)
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-posts
    • widget_recent-comments
    • can_compress_scripts
    • theysaidso_admin_options

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though no errors were found, this is by no means 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
Looking good! No server-side errors or output on direct access of PHP files

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
Attributes that need to be fixed:
  • Screenshots: Screenshot #1 (The main settings to integrate WordPress with WeChat.) image not found
You can look at the official readme.txt

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

The principal PHP file in "WP Weixin Broadcast" v. 1.3.15 is loaded by WordPress automatically on each request
30 characters long description:
WeChat Broadcast for WordPress

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Good job! No executable or dangerous file extensions detected11,452 lines of code in 90 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript641,5364435,818
PHP206841043,091
CSS4223131,323
Markdown12060687
PO File1204230533

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.36
Average class complexity95.50
▷ Minimum class complexity25.00
▷ Maximum class complexity214.00
Average method complexity4.35
▷ Minimum method complexity1.00
▷ Maximum method complexity51.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods113
▷ Static methods1412.39%
▷ Public methods7566.37%
▷ Protected methods3833.63%
▷ Private methods00.00%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants7
▷ Global constants342.86%
▷ Class constants457.14%
▷ Public constants4100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
5 PNG files occupy 0.01MB with 0.01MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/placeholder-preview-thumb.png0.72KB0.49KB▼ 32.79%
images/placeholder-deleted-thumb.png1.25KB0.71KB▼ 43.74%
images/placeholder-preview-full.png1.79KB0.88KB▼ 50.71%
images/wp-weixin-broadcast-cover-placeholder.png5.88KB2.41KB▼ 59.09%
images/placeholder-deleted-full.png3.27KB1.51KB▼ 53.97%