84% weixinhost

Code Review | 微信侯斯特 WordPress 伴侣插件

WordPress plugin 微信侯斯特 WordPress 伴侣插件 scored84%from 54 tests.

About plugin

  • Plugin page: weixinhost
  • Plugin version: 1.0.3
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-4.0
  • WordPress version: 6.3.1
  • First release: Aug 20, 2014
  • Latest release: Oct 19, 2015
  • Number of updates: 15
  • Update frequency: every 28.4 days
  • Top authors: Weixinhost (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /2,001 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.04MB] [CPU: ▼5.37ms] Passed 4 tests

Server-side resources used by 微信侯斯特 WordPress 伴侣插件
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0439.93 ▼3.09
Dashboard /wp-admin3.34 ▲0.0450.80 ▼5.26
Posts /wp-admin/edit.php3.39 ▲0.0457.48 ▲8.05
Add New Post /wp-admin/post-new.php5.92 ▲0.0485.92 ▼16.98
Media Library /wp-admin/upload.php3.26 ▲0.0436.78 ▲3.87
微信侯斯特伴侣 /wp-admin/options-general.php?page=weixinhost-config3.2334.28

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

Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 3 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
db_upgraded
widget_theysaidso_widget
can_compress_scripts
theysaidso_admin_options
widget_recent-posts

Browser metrics Passed 4 tests

微信侯斯特 WordPress 伴侣插件: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲5813.22 ▼0.961.60 ▼0.1641.36 ▼3.76
Dashboard /wp-admin2,207 ▲194.90 ▼0.02123.14 ▲4.0055.60 ▲13.91
Posts /wp-admin/edit.php2,096 ▲41.99 ▼0.0144.56 ▼0.3141.23 ▲6.42
Add New Post /wp-admin/post-new.php1,517 ▼2117.54 ▼5.56596.28 ▼31.4772.08 ▲15.96
Media Library /wp-admin/upload.php1,386 ▼24.27 ▲0.1195.64 ▼13.1545.98 ▲2.80
微信侯斯特伴侣 /wp-admin/options-general.php?page=weixinhost-config8002.0226.0076.46

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • Zombie WordPress options detected upon uninstall: 6 options
    • can_compress_scripts
    • widget_recent-comments
    • widget_recent-posts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Everything seems fine, however this is by no means an exhaustive test

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
  • 2× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/weixinhost/weixinhost.php:11
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_query_arg() in wp-content/plugins/weixinhost/views/config.php:4

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
2 plugin tags: weixin, wechat

weixinhost/weixinhost.php 92% from 13 tests

The principal PHP file in "微信侯斯特 WordPress 伴侣插件" v. 1.0.3 is loaded by WordPress automatically on each request
The following require your attention:
  • Description: Keep the plugin description shorter than 140 characters (currently 272 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Everything looks great! No dangerous files found in this plugin230 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP2958230

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.30
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%
Functions10
▷ Named functions10100.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants4100.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
No PNG files were detected