Benchmarks
Plugin footprint 83% 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: ▲1.34MB] [CPU: ▲5.36ms] Passed 4 tests
An overview of server-side resources used by WP Weixin
This plugin does not affect your website's performance
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 4.83 ▲1.37 | 50.40 ▲13.17 |
Dashboard /wp-admin | 4.69 ▲1.35 | 52.11 ▼6.62 |
Posts /wp-admin/edit.php | 4.74 ▲1.39 | 54.50 ▲11.42 |
Add New Post /wp-admin/post-new.php | 7.21 ▲1.32 | 97.32 ▲3.45 |
Media Library /wp-admin/upload.php | 4.55 ▲1.32 | 50.97 ▲15.46 |
Server storage [IO: ▲0.72MB] [DB: ▲0.00MB] Passed 3 tests
Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 60 new files
Database: no new tables, 7 new options
New WordPress options |
---|
widget_theysaidso_widget |
can_compress_scripts |
wp_weixin_plugin_version |
theysaidso_admin_options |
db_upgraded |
widget_recent-posts |
widget_recent-comments |
Browser metrics Passed 4 tests
This is an overview of browser requirements for WP Weixin
There were no issues detected in relation to browser resource usage
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,805 ▲43 | 14.25 ▼0.10 | 2.07 ▲0.49 | 42.24 ▲2.28 |
Dashboard /wp-admin | 2,201 ▲20 | 5.56 ▼0.09 | 91.21 ▼6.66 | 63.88 ▲13.13 |
Posts /wp-admin/edit.php | 2,118 ▲18 | 1.95 ▼0.00 | 38.98 ▲3.41 | 34.00 ▲2.25 |
Add New Post /wp-admin/post-new.php | 1,692 ▲166 | 22.49 ▼0.32 | 643.96 ▼39.63 | 45.74 ▼6.76 |
Media Library /wp-admin/upload.php | 1,415 ▲15 | 4.21 ▲0.00 | 101.30 ▼7.87 | 69.50 ▲23.40 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 75% from 4 tests
🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
Please fix the following items
- This plugin did not uninstall successfully, leaving 6 options in the database
- widget_theysaidso_widget
- widget_recent-posts
- theysaidso_admin_options
- can_compress_scripts
- db_upgraded
- widget_recent-comments
Smoke tests Passed 4 tests
Server-side errors Passed 1 test
🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Everything seems fine, however this is by no means an exhaustive test
SRP Passed 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
Looking good! No server-side errors or output on direct access of PHP files
User-side errors Passed 1 test
🔹 Test weight: 20 | This is a shallow check for browser errors
No browser errors were detected
Optimizations
Plugin configuration Passed 29 tests
readme.txt Passed 16 tests
The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
2 plugin tags: wechat share, wechat
wp-weixin/wp-weixin.php Passed 13 tests
The entry point to "WP Weixin" version 1.3.16 is a PHP file that has certain tags in its header comment area
28 characters long description:
WordPress WeChat integration
Code Analysis 97% from 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 plugin11,947 lines of code in 49 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 30 | 2,323 | 1,282 | 9,020 |
Markdown | 1 | 485 | 0 | 1,276 |
JavaScript | 8 | 131 | 34 | 679 |
PO File | 1 | 186 | 228 | 583 |
CSS | 8 | 58 | 0 | 388 |
SVG | 1 | 0 | 0 | 1 |
PHP code 50% from 2 tests
This is a very shot review of cyclomatic complexity and code structure
It is recommended to fix the following
- Cyclomatic complexity of methods has to be reduced to less than 100 (currently 288)
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.41 |
Average class complexity | 56.90 |
▷ Minimum class complexity | 1.00 |
▷ Maximum class complexity | 513.00 |
Average method complexity | 5.13 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 288.00 |
Code structure | ||
---|---|---|
Namespaces | 0 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 29 | |
▷ Abstract classes | 0 | 0.00% |
▷ Concrete classes | 29 | 100.00% |
▷ Final classes | 0 | 0.00% |
Methods | 393 | |
▷ Static methods | 92 | 23.41% |
▷ Public methods | 322 | 81.93% |
▷ Protected methods | 41 | 10.43% |
▷ Private methods | 30 | 7.63% |
Functions | 20 | |
▷ Named functions | 18 | 90.00% |
▷ Anonymous functions | 2 | 10.00% |
Constants | 97 | |
▷ Global constants | 37 | 38.14% |
▷ Class constants | 60 | 61.86% |
▷ Public constants | 60 | 100.00% |
Plugin size 50% from 2 tests
Image compression 50% from 2 tests
Often times overlooked, PNG files can occupy unnecessary space in your plugin
4 PNG files occupy 0.02MB with 0.01MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
images/qr-placeholder.png | 3.30KB | 1.17KB | ▼ 64.69% |
images/default-welcome.png | 11.11KB | 3.20KB | ▼ 71.22% |
images/wechat.png | 3.58KB | 0.97KB | ▼ 72.91% |
(invalid) images/default-avatar.png | 1.49KB | 0.00KB | ▼ 100.00% |