58% wx-subscribe

Code Review | WX Subscribe 微信支付付费订阅

WordPress plugin WX Subscribe 微信支付付费订阅 scored58%from 54 tests.

About plugin

  • Plugin page: wx-subscribe
  • Plugin version: 1.2
  • PHP compatiblity: 7.0.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-4.9.5
  • WordPress version: 6.3.1
  • First release: Apr 30, 2018
  • Latest release: May 5, 2018
  • Number of updates: 18
  • Update frequency: every 0.3 days
  • Top authors: bestony (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,913 total downloads

Benchmarks

Plugin footprint 48% 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.87MB] [CPU: ▼38.91ms] Passed 4 tests

A check of server-side resources used by WX Subscribe 微信支付付费订阅
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.56 ▲0.1036.18 ▲0.10
Dashboard /wp-admin3.08 ▼0.2624.29 ▼33.39
Posts /wp-admin/edit.php3.08 ▼0.2726.71 ▼21.97
Add New Post /wp-admin/post-new.php3.08 ▼2.8024.87 ▼85.82
Media Library /wp-admin/upload.php3.08 ▼0.1422.60 ▼14.44
微信订阅 /wp-admin/admin.php?page=wxs-plugin-admin3.0825.26
插件配置 /wp-admin/admin.php?page=wxs-options-list3.0825.60

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

Analyzing filesystem and database footprints of this plugin
This plugin installed successfully
Filesystem: 20 new files
Database: 1 new table, 7 new options
New tables
wp_subscribe_order
New WordPress options
theysaidso_admin_options
widget_recent-posts
wxs_db_version
can_compress_scripts
db_upgraded
widget_theysaidso_widget
widget_recent-comments

Browser metrics Passed 4 tests

An overview of browser requirements for WX Subscribe 微信支付付费订阅
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,842 ▲9613.18 ▼1.181.59 ▼0.1636.62 ▼3.80
Dashboard /wp-admin2,248 ▲604.89 ▲0.02110.54 ▼3.6354.03 ▲12.76
Posts /wp-admin/edit.php2,127 ▲352.06 ▲0.0540.30 ▲1.5950.66 ▲14.81
Add New Post /wp-admin/post-new.php1,551 ▲1617.62 ▼5.54660.21 ▼10.0271.17 ▲14.78
Media Library /wp-admin/upload.php1,430 ▲424.26 ▲0.04107.72 ▼4.9657.26 ▲10.02
微信订阅 /wp-admin/admin.php?page=wxs-plugin-admin1,0092.1528.3680.91
插件配置 /wp-admin/admin.php?page=wxs-options-list8162.0727.8653.30

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
  • The plugin did not uninstall gracefully
    • > Notice in wp-content/plugins/wx-subscribe/libs/utils.php+9
    Trying to access array offset on value of type bool
  • This plugin does not fully uninstall, leaving 1 table in the database
    • wp_subscribe_order
  • This plugin did not uninstall successfully, leaving 7 options in the database
    • can_compress_scripts
    • wxs_db_version
    • widget_recent-posts
    • widget_theysaidso_widget
    • widget_recent-comments
    • theysaidso_admin_options
    • db_upgraded

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Smoke test failed, please fix the following
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=wxs-options-list
    • > Notice in wp-content/plugins/wx-subscribe/libs/utils.php+9
    Trying to access array offset on value of type bool

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 items
  • 9× 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/wx-subscribe/admin/userprofile.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wx-subscribe/admin/payjs.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wx-subscribe/admin/notices.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wx-subscribe/admin/dashboard.php:32
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wx-subscribe/admin/plugin-option.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wx-subscribe/admin/post.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wx-subscribe/admin/notices.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/wx-subscribe/user/content.php:17
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/wx-subscribe/admin/shortcode.php:36

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
2 plugin tags: subscribe, payment

wx-subscribe/wx-subscribe.php 92% from 13 tests

"WX Subscribe 微信支付付费订阅" version 1.2's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
It is important to fix the following:
  • Description: Please don't use more than 140 characters for the plugin description (currently 206 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
No dangerous file extensions were detected830 lines of code in 18 files:
LanguageFilesBlank linesComment linesLines of code
PHP17136304780
Markdown133050

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.25
Average class complexity11.00
▷ Minimum class complexity11.00
▷ Maximum class complexity11.00
Average method complexity2.11
▷ Minimum method complexity1.00
▷ Maximum method complexity5.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods9
▷ Static methods00.00%
▷ Public methods666.67%
▷ Protected methods333.33%
▷ Private methods00.00%
Functions31
▷ Named functions31100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
PNG images were not found in this plugin