Benchmarks
Plugin footprint 65% from 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed gracefully, with no errors
Server metrics [RAM: ▲0.02MB] [CPU: ▼6.92ms] Passed 4 tests
Analyzing server-side resources used by Wordpress 文章点赞
Normal server usage
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.42 ▼0.04 | 26.03 ▼14.51 |
Dashboard /wp-admin | 3.34 ▲0.04 | 49.32 ▲2.39 |
Posts /wp-admin/edit.php | 3.46 ▲0.10 | 46.84 ▼2.63 |
Add New Post /wp-admin/post-new.php | 5.92 ▲0.04 | 91.91 ▼8.38 |
Media Library /wp-admin/upload.php | 3.27 ▲0.04 | 36.70 ▼2.14 |
WP-Zan 设置 /wp-admin/options-general.php?page=wpzan.functions.php | 3.23 | 34.18 |
Server storage [IO: ▲0.03MB] [DB: ▲0.00MB] Passed 3 tests
Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 15 new files
Database: 1 new table, 6 new options
New tables |
---|
wp_zan |
New WordPress options |
---|
widget_recent-posts |
db_upgraded |
widget_recent-comments |
widget_theysaidso_widget |
can_compress_scripts |
theysaidso_admin_options |
Browser metrics Passed 4 tests
An overview of browser requirements for Wordpress 文章点赞
Normal browser usage
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,829 ▲68 | 14.29 ▼0.07 | 2.07 ▲0.18 | 46.08 ▲1.09 |
Dashboard /wp-admin | 2,199 ▲19 | 5.57 ▼0.10 | 89.69 ▼1.36 | 45.73 ▲0.71 |
Posts /wp-admin/edit.php | 2,104 ▲4 | 2.02 ▲0.05 | 34.64 ▼1.82 | 39.86 ▲5.06 |
Add New Post /wp-admin/post-new.php | 1,529 ▼6 | 23.72 ▲5.29 | 686.00 ▼3.12 | 55.82 ▼8.65 |
Media Library /wp-admin/upload.php | 1,401 ▲4 | 4.12 ▼0.09 | 101.46 ▼12.85 | 50.90 ▼0.05 |
WP-Zan 设置 /wp-admin/options-general.php?page=wpzan.functions.php | 1,224 | 2.41 | 51.80 | 77.74 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 50% from 4 tests
🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
Please fix the following items
- The uninstall procedure failed, leaving 1 table in the database
- wp_zan
- This plugin did not uninstall successfully, leaving 6 options in the database
- can_compress_scripts
- widget_recent-posts
- db_upgraded
- theysaidso_admin_options
- widget_recent-comments
- widget_theysaidso_widget
Smoke tests 50% from 4 tests
Server-side errors 0% from 1 test
🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
These server-side errors were triggered
- 3 occurences, only the last one shown
- > GET request to /wp-admin/options-general.php?page=wpzan.functions.php
- > Notice in wp-content/plugins/wp-zan/include/wpzan-setting.php+41
Trying to access array offset on value of type bool
SRP 50% 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 take a closer look at the following
- 3× PHP files trigger server errors when accessed directly:
- > PHP Fatal error
Uncaught Error: Call to undefined function plugins_url() in wp-content/plugins/wp-zan/wp-zan.php:12
- > PHP Fatal error
Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wp-zan/wpzan.functions.php:12
- > PHP Fatal error
Uncaught Error: Call to undefined function settings_fields() in wp-content/plugins/wp-zan/include/wpzan-setting.php:5
- > PHP Fatal error
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 Passed 29 tests
readme.txt Passed 16 tests
Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
1 plugin tags: wordpress
wp-zan/wp-zan.php Passed 13 tests
The main PHP file in "Wordpress 文章点赞" ver. 0.0.10 adds more information about the plugin and also serves as the entry point for this plugin
22 characters long description:
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
There were no executable files found in this plugin494 lines of code in 10 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 4 | 52 | 46 | 245 |
CSS | 2 | 30 | 2 | 202 |
JavaScript | 3 | 3 | 4 | 35 |
SVG | 1 | 0 | 0 | 12 |
PHP code Passed 2 tests
This plugin's cyclomatic complexity and code structure detailed below
There were no cyclomatic complexity issued detected
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.22 |
Average class complexity | 10.00 |
▷ Minimum class complexity | 10.00 |
▷ Maximum class complexity | 10.00 |
Average method complexity | 2.80 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 4.00 |
Code structure | ||
---|---|---|
Namespaces | 0 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 1 | |
▷ Abstract classes | 0 | 0.00% |
▷ Concrete classes | 1 | 100.00% |
▷ Final classes | 0 | 0.00% |
Methods | 5 | |
▷ Static methods | 0 | 0.00% |
▷ Public methods | 5 | 100.00% |
▷ Protected methods | 0 | 0.00% |
▷ Private methods | 0 | 0.00% |
Functions | 17 | |
▷ Named functions | 17 | 100.00% |
▷ Anonymous functions | 0 | 0.00% |
Constants | 4 | |
▷ Global constants | 4 | 100.00% |
▷ Class constants | 0 | 0.00% |
▷ Public constants | 0 | 0.00% |
Plugin size Passed 2 tests
Image compression Passed 2 tests
It is recommended to compress PNG files in your plugin to minimize bandwidth usage
No PNG files were detected