Benchmarks
Plugin footprint 23% from 16 tests
Installer 0% from 1 test
🔺 Critical test (weight: 50) | The install procedure must perform silently
It is recommended to fix the following installer errors
- The plugin cannot be installed
- > Warning in wp-content/plugins/social-medias-connect/SMConnect.php+1174
"continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"?
Server metrics [RAM: ▼1.31MB] [CPU: ▼52.69ms] Passed 4 tests
Analyzing server-side resources used by Social Medias Connect
This plugin has minimal impact on server resources
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 2.68 ▼0.79 | 7.07 ▼34.50 |
Dashboard /wp-admin | 2.70 ▼0.61 | 7.64 ▼46.45 |
Posts /wp-admin/edit.php | 2.70 ▼0.66 | 7.81 ▼41.77 |
Add New Post /wp-admin/post-new.php | 2.70 ▼3.19 | 7.07 ▼88.05 |
Media Library /wp-admin/upload.php | 2.70 ▼0.53 | 9.09 ▼29.34 |
插件设置 /wp-admin/admin.php?page=smc_bind_weibo_option | 2.70 | 10.32 |
卸载插件 /wp-admin/admin.php?page=smc_bind_weibo_uninstall | 2.70 | 7.30 |
帮助 /wp-admin/admin.php?page=smc_bind_weibo_help | 2.70 | 8.00 |
微博账号绑定 /wp-admin/admin.php?page=social-medias-connect | 2.70 | 6.58 |
Server storage [IO: ▲0.41MB] [DB: ▲0.00MB] Passed 3 tests
Input-output and database impact of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 67 new files
Database: no new tables, 9 new options
New WordPress options |
---|
widget_recent-posts |
can_compress_scripts |
smc_weibo_options |
widget_smc_sidebar_login_widget |
widget_theysaidso_widget |
theysaidso_admin_options |
smc_vesion_compatible |
widget_recent-comments |
db_upgraded |
Browser metrics Passed 4 tests
Checking browser requirements for Social Medias Connect
Normal browser usage
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,894 ▲148 | 13.27 ▼1.14 | 1.61 ▼0.60 | 44.14 ▼1.67 |
Dashboard /wp-admin | 2,234 ▲46 | 4.90 ▼0.98 | 99.52 ▼24.19 | 90.43 ▲44.94 |
Posts /wp-admin/edit.php | 2,131 ▲42 | 2.04 ▼0.01 | 37.15 ▲1.24 | 48.38 ▲10.90 |
Add New Post /wp-admin/post-new.php | 6,246 ▲4,713 | 26.04 ▲2.61 | 1,037.36 ▲326.18 | 75.81 ▲17.01 |
Media Library /wp-admin/upload.php | 1,431 ▲40 | 4.18 ▼0.04 | 99.19 ▼16.12 | 81.64 ▲33.97 |
插件设置 /wp-admin/admin.php?page=smc_bind_weibo_option | 1,422 | 2.04 | 38.40 | 82.39 |
卸载插件 /wp-admin/admin.php?page=smc_bind_weibo_uninstall | 937 | 2.04 | 26.60 | 55.45 |
帮助 /wp-admin/admin.php?page=smc_bind_weibo_help | 1,036 | 2.08 | 24.78 | 82.69 |
微博账号绑定 /wp-admin/admin.php?page=social-medias-connect | 1,044 | 2.17 | 26.94 | 62.82 |
Uninstaller [IO: ▲0.41MB] [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 attentionThis plugin does not fully uninstall, leaving 10 options in the database
- Uninstall procedure had uncaught errors
- > Warning in wp-content/plugins/social-medias-connect/SMConnect.php+1174
"continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"?
- Incomplete uninstall procedure, leaving 67 files (0.41MB) in the plugin directory
- (new file) bindweibo.php
- (new file) douban/Douban.php
- (new file) 163weibo/NetEaseWeibo.php
- (new file) 360cn/CN360.php
- (new file) facebook/Facebook.php
- (new file) css/smc-admin.css
- (new file) baidu/Baidu.php
- (new file) bindoption.php
- (new file) SMConnect.php
- (new file) css/smc-style.css
- ...
- widget_theysaidso_widget
- widget_recent-posts
- smc_weibo_options
- theysaidso_admin_options
- db_upgraded
- widget_smc_sidebar_login_widget
- smc_vesion_compatible
- can_compress_scripts
- recovery_mode_email_last_sent
- widget_recent-comments
Smoke tests 50% from 4 tests
Server-side errors 0% from 1 test
🔹 Test weight: 20 | This is a shallow check for server-side errors
Almost there, just fix the following server-side errors
- 4 occurences, only the last one shown
- > GET request to /wp-admin/admin.php?page=social-medias-connect
- > Warning in wp-content/plugins/social-medias-connect/SMConnect.php+1174
"continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"?
- 4 occurences, only the last one shown
- > GET request to /wp-admin/admin.php?page=social-medias-connect
- > Deprecated in wp-content/plugins/social-medias-connect/widgets.php+2
Methods with the same name as their class will not be constructors in a future version of PHP; smc_sidebar_login_widget has a deprecated constructor
- 4 occurences, only the last one shown
- > GET request to /wp-admin/admin.php?page=social-medias-connect
- > User deprecated in wp-includes/functions.php+5546
The called constructor method for WP_Widget class in smc_sidebar_login_widget is deprecated since version 4.3.0! Use __construct() instead.
- 16 occurences, only the last one shown
- > GET request to /wp-admin/admin.php?page=social-medias-connect
- > Notice in wp-content/plugins/social-medias-connect/SMConnect.php+404
Undefined index: smcaction
- 12 occurences, only the last one shown
- > GET request to /wp-admin/admin.php?page=social-medias-connect
- > Notice in wp-content/plugins/social-medias-connect/SMConnect.php+111
Undefined index: smc_request
- 4 occurences, only the last one shown
- > GET request to /wp-admin/admin.php?page=social-medias-connect
- > Notice in wp-content/plugins/social-medias-connect/SMConnect.php+1071
Undefined index: socialmedia
- 4 occurences, only the last one shown
- > GET request to /wp-admin/admin.php?page=social-medias-connect
- > Notice in wp-content/plugins/social-medias-connect/SMConnect.php+1071
Undefined index: oauth_token
- 26 occurences, only the last one shown
- > GET request to /wp-admin/admin.php?page=social-medias-connect
- > User deprecated in wp-includes/functions.php+5737
Function has_cap was called with an argument that is deprecated since version 2.0.0! Usage of user levels is deprecated. Use capabilities instead.
- 4 occurences, only the last one shown
- > GET request to /wp-admin/admin.php?page=social-medias-connect
- > Notice in wp-content/plugins/social-medias-connect/SMConnect.php+166
Undefined index: smcregister
- 2 occurences, only the last one shown
- > GET request to /wp-admin/admin.php?page=smc_bind_weibo_option
- > Notice in wp-content/plugins/social-medias-connect/bindoption.php+183
Undefined index: box
- > GET request to /wp-admin/admin.php?page=smc_bind_weibo_uninstall
- > Notice in wp-content/plugins/social-medias-connect/uninstall.php+1
Undefined index: action
- 2 occurences, only the last one shown
- > GET request to /wp-admin/admin.php?page=smc_bind_weibo_uninstall
- > Notice in wp-content/plugins/social-medias-connect/uninstall.php+41
Undefined index: uninstall_unsend
- 3 occurences, only the last one shown
- > GET request to /wp-admin/admin.php?page=smc_bind_weibo_uninstall
- > Notice in wp-content/plugins/social-medias-connect/uninstall.php+41
Undefined index: uninstall_send
- > GET request to /wp-admin/admin.php?page=smc_bind_weibo_uninstall
- > Notice in wp-content/plugins/social-medias-connect/uninstall.php+9
Undefined index: reset_option
- > GET request to /wp-admin/admin.php?page=smc_bind_weibo_uninstall
- > Notice in wp-content/plugins/social-medias-connect/uninstall.php+58
Undefined variable: info
- 5 occurences, only the last one shown
- > GET request to /wp-admin/admin.php?page=social-medias-connect
- > Notice in wp-content/plugins/social-medias-connect/smctable.php+110
Undefined index: filter
- > GET request to /wp-admin/admin.php?page=social-medias-connect
- > Notice in wp-content/plugins/social-medias-connect/smctable.php+42
Undefined index: orderby
- > GET request to /wp-admin/admin.php?page=social-medias-connect
- > Notice in wp-content/plugins/social-medias-connect/smctable.php+43
Undefined index: order
SRP 50% from 2 tests
🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please fix the following
- 40× PHP files trigger server errors when accessed directly (only 10 are shown):
- > PHP Warning
require_once(ABSPATHwp-admin/includes/class-wp-list-table.php): failed to open stream: No such file or directory in wp-content/plugins/social-medias-connect/smctable.php on line 3
- > PHP Notice
Undefined index: reset_option in wp-content/plugins/social-medias-connect/uninstall.php on line 9
- > PHP Fatal error
Uncaught Error: Using $this when not in object context in wp-content/plugins/social-medias-connect/uninstall.php:49
- > PHP Fatal error
Uncaught Error: Class 'smcHttp' not found in wp-content/plugins/social-medias-connect/163weibo/NetEaseWeibo.php:2
- > PHP Fatal error
Uncaught Error: Class 'smcHttp' not found in wp-content/plugins/social-medias-connect/msnlive/MSNLive.php:2
- > PHP Notice
Undefined index: uninstall_send in wp-content/plugins/social-medias-connect/uninstall.php on line 9
- > PHP Fatal error
Uncaught Error: Class 'smcHttp' not found in wp-content/plugins/social-medias-connect/360cn/CN360.php:2
- > PHP Fatal error
Uncaught Error: Class 'smcHttp' not found in wp-content/plugins/social-medias-connect/douban/Douban.php:2
- > PHP Fatal error
Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/social-medias-connect/widgets.php:2
- > PHP Fatal error
Uncaught Error: Class 'smcHttp' not found in wp-content/plugins/social-medias-connect/google/Google.php:2
- > PHP Warning
User-side errors Passed 1 test
🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side
Optimizations
Plugin configuration 97% from 29 tests
readme.txt 94% from 16 tests
It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
These attributes need to be fixed:
- Screenshots: Please add images for these screenshots: #1 (后台同步文章效果), #2 (登陆界面效果), #3 (后台绑定文章页面), #4 (后台设置界面)
social-medias-connect/social-medias-connect.php Passed 13 tests
The entry point to "Social Medias Connect" version 2.0.16 is a PHP file that has certain tags in its header comment area
80 characters long description:
为WordPress提供社交媒体网站连接同步功能, 支持微博账号绑定
Code Analysis Passed 3 tests
File types Passed 1 test
🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Everything looks great! No dangerous files found in this plugin4,151 lines of code in 33 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 29 | 123 | 293 | 3,956 |
JavaScript | 2 | 2 | 4 | 100 |
CSS | 2 | 0 | 4 | 95 |
PHP code Passed 2 tests
A brief analysis of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity issues
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.31 |
Average class complexity | 19.87 |
▷ Minimum class complexity | 1.00 |
▷ Maximum class complexity | 240.00 |
Average method complexity | 3.64 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 47.00 |
Code structure | ||
---|---|---|
Namespaces | 0 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 30 | |
▷ Abstract classes | 0 | 0.00% |
▷ Concrete classes | 30 | 100.00% |
▷ Final classes | 0 | 0.00% |
Methods | 214 | |
▷ Static methods | 17 | 7.94% |
▷ Public methods | 213 | 99.53% |
▷ Protected methods | 0 | 0.00% |
▷ Private methods | 1 | 0.47% |
Functions | 3 | |
▷ Named functions | 3 | 100.00% |
▷ Anonymous functions | 0 | 0.00% |
Constants | 2 | |
▷ Global constants | 2 | 100.00% |
▷ Class constants | 0 | 0.00% |
▷ Public constants | 0 | 0.00% |
Plugin size Passed 2 tests
Image compression Passed 2 tests
Often times overlooked, PNG files can occupy unnecessary space in your plugin
31 PNG files occupy 0.22MB with 0.11MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
images/icons/360cn.png | 2.31KB | 1.76KB | ▼ 23.88% |
images/icons/google.png | 2.38KB | 0.86KB | ▼ 63.85% |
images/icons/renren.png | 1.02KB | 1.12KB | 0.00% |
images/icons/github.png | 4.20KB | 1.04KB | ▼ 75.23% |
images/icons/taobao.png | 2.10KB | 0.50KB | ▼ 76.30% |