Benchmarks
Plugin footprint 23% from 16 tests
Installer 0% from 1 test
🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
You still need to fix the following installer errors
- Install procedure validation failed for this plugin
- > Deprecated in wp-content/plugins/jiaoliuping/consumer/ydhl_oauthclient.php+8
Methods with the same name as their class will not be constructors in a future version of PHP; YDHL_OAuthClient has a deprecated constructor
Server metrics [RAM: ▼1.76MB] [CPU: ▼186.21ms] Passed 4 tests
An overview of server-side resources used by Plugin Name:交流瓶Wordpress插件
Normal server usage
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 1.87 ▼0.85 | 8.88 ▼12.07 |
Dashboard /wp-admin | 1.89 ▼1.17 | 6.25 ▼29.31 |
Posts /wp-admin/edit.php | 1.89 ▼1.22 | 5.66 ▼38.13 |
Add New Post /wp-admin/post-new.php | 1.89 ▼3.55 | 6.50 ▼648.74 |
Media Library /wp-admin/upload.php | 1.89 ▼1.12 | 6.41 ▼28.65 |
Server storage [IO: ▲0.23MB] [DB: ▲0.01MB] Passed 3 tests
A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 42 new files
Database: 6 new tables, 1 new option
New tables |
---|
wp_ydhl_oauth_client_endpoints |
wp_ydhl_oauth_clients |
wp_ydhl_oauth_scopes |
wp_ydhl_oauth_session_scopes |
wp_ydhl_oauth_sessions |
wp_ydhl_oauth_logins |
New WordPress options |
---|
jiaoliuping_admin_id |
Browser metrics Passed 4 tests
An overview of browser requirements for Plugin Name:交流瓶Wordpress插件
This plugin has a minimal impact on browser resources
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 3,732 ▲136 | 16.24 ▲0.25 | 10.11 ▼0.92 | 49.79 ▲2.63 |
Dashboard /wp-admin | 2,979 ▲48 | 5.90 ▼0.14 | 135.70 ▼8.80 | 151.57 ▲43.96 |
Posts /wp-admin/edit.php | 2,759 ▲23 | 2.60 ▼0.12 | 64.32 ▲1.89 | 88.54 ▲5.17 |
Add New Post /wp-admin/post-new.php | 1,659 ▼24 | 21.44 ▲2.72 | 286.12 ▼116.37 | 148.77 ▲40.89 |
Media Library /wp-admin/upload.php | 1,770 ▼40 | 5.02 ▼0.01 | 139.13 ▼19.54 | 142.15 ▲30.89 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 25% 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
- This plugin cannot be uninstalled
- > Deprecated in wp-content/plugins/jiaoliuping/consumer/ydhl_oauthclient.php+8
Methods with the same name as their class will not be constructors in a future version of PHP; YDHL_OAuthClient has a deprecated constructor
- The uninstall procedure failed, leaving 1 table in the database
- wp_ydhl_oauth_logins
- Zombie WordPress options were found after uninstall: 1 option
- jiaoliuping_admin_id
Smoke tests 50% from 4 tests
Server-side errors Passed 1 test
🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though everything seems fine, this is not an exhaustive test
SRP 0% 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
Please fix the following
- 8× PHP files output non-empty strings when accessed directly via GET requests:
- > /wp-content/plugins/jiaoliuping/signin.php
- > /wp-content/plugins/jiaoliuping/reply.php
- > /wp-content/plugins/jiaoliuping/access_token.php
- > /wp-content/plugins/jiaoliuping/authorise.php
- > /wp-content/plugins/jiaoliuping/update.php
- > /wp-content/plugins/jiaoliuping/post.php
- > /wp-content/plugins/jiaoliuping/replylist.php
- > /wp-content/plugins/jiaoliuping/userinfo.php
- 14× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
- > PHP Fatal error
Uncaught Error: Interface 'OAuth2\\Grant\\GrantTypeInterface' not found in wp-content/plugins/jiaoliuping/sp/Password.php:25
- > PHP Fatal error
Uncaught Error: Interface 'OAuth2\\Grant\\GrantTypeInterface' not found in wp-content/plugins/jiaoliuping/sp/RefreshToken.php:25
- > PHP Notice
Undefined index: access_token in wp-content/plugins/jiaoliuping/userinfo.php on line 4
- > PHP Fatal error
Uncaught Error: Call to undefined function add_action() in wp-content/plugins/jiaoliuping/jiaoliuping.php:383
- > PHP Fatal error
Uncaught Error: Class 'OAuth2\\Exception\\OAuth2Exception' not found in wp-content/plugins/jiaoliuping/sp/InvalidAccessTokenException.php:17
- > PHP Fatal error
Uncaught Error: Class 'OAuth2\\Exception\\OAuth2Exception' not found in wp-content/plugins/jiaoliuping/sp/InvalidGrantTypeException.php:17
- > PHP Notice
Undefined index: access_token in wp-content/plugins/jiaoliuping/replylist.php on line 4
- > PHP Notice
Undefined index: regsite in wp-content/plugins/jiaoliuping/config.php on line 6
- > PHP Fatal error
Uncaught Error: Call to undefined function wp_die() in wp-content/plugins/jiaoliuping/authorise.php:17
- > PHP Fatal error
Uncaught Error: Call to undefined function get_option() in wp-content/plugins/jiaoliuping/config.php:189
- > PHP Fatal error
User-side errors Passed 1 test
🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
No browser issues were found
Optimizations
Plugin configuration 86% from 29 tests
readme.txt 81% from 16 tests
The readme.txt file uses markdown syntax to describe your plugin to the world
These attributes need to be fixed:
- Contributors: Please add at least on tag
- Plugin Name: Write the name of your plugin instead of "Plugin Name" on the first line (
=== Plugin Name:交流瓶Wordpress插件===
) - Contributors: Contributors not specified
jiaoliuping/jiaoliuping.php 92% from 13 tests
The main PHP file in "Plugin Name:交流瓶Wordpress插件" ver. 0.2.2 adds more information about the plugin and also serves as the entry point for this plugin
It is important to fix the following:
- Description: Please keep the plugin description shorter than 140 characters (currently 424 characters long)
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
Success! There were no dangerous files found in this plugin4,558 lines of code in 37 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
CSS | 2 | 18 | 37 | 2,429 |
PHP | 35 | 495 | 995 | 2,129 |
PHP code Passed 2 tests
Cyclomatic complexity and code structure are the fingerprint of this plugin
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.25 |
Average class complexity | 5.20 |
▷ Minimum class complexity | 1.00 |
▷ Maximum class complexity | 20.00 |
Average method complexity | 2.21 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 11.00 |
Code structure | ||
---|---|---|
Namespaces | 5 | |
Interfaces | 5 | |
Traits | 0 | |
Classes | 20 | |
▷ Abstract classes | 0 | 0.00% |
▷ Concrete classes | 20 | 100.00% |
▷ Final classes | 0 | 0.00% |
Methods | 111 | |
▷ Static methods | 18 | 16.22% |
▷ Public methods | 106 | 95.50% |
▷ Protected methods | 5 | 4.50% |
▷ Private methods | 0 | 0.00% |
Functions | 21 | |
▷ Named functions | 21 | 100.00% |
▷ Anonymous functions | 0 | 0.00% |
Constants | 10 | |
▷ Global constants | 10 | 100.00% |
▷ Class constants | 0 | 0.00% |
▷ Public constants | 0 | 0.00% |
Plugin size Passed 2 tests
Image compression Passed 2 tests
PNG files should be compressed to save space and minimize bandwidth usage
4 PNG files occupy 0.02MB with 0.00MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
bootstrap/img/glyphicons-halflings.png | 12.50KB | 10.35KB | ▼ 17.19% |
jiaoliuping.png | 1.62KB | 1.42KB | ▼ 12.51% |
bootstrap/img/glyphicons-halflings-white.png | 8.57KB | 9.20KB | 0.00% |
icon.png | 0.46KB | 0.32KB | ▼ 31.37% |