Benchmarks
Plugin footprint 83% from 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed gracefully, with no errors
Server metrics [RAM: ▼0.04MB] [CPU: ▼7.71ms] Passed 4 tests
An overview of server-side resources used by txt2img (山寨长微博)
No issues were detected with server-side resource usage
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.49 ▲0.02 | 39.70 ▲3.93 |
Dashboard /wp-admin | 3.13 ▼0.17 | 28.32 ▼18.32 |
Posts /wp-admin/edit.php | 3.39 ▲0.03 | 43.36 ▼0.86 |
Add New Post /wp-admin/post-new.php | 5.91 ▲0.02 | 90.25 ▼5.21 |
Media Library /wp-admin/upload.php | 3.20 ▼0.03 | 28.48 ▼6.45 |
Server storage [IO: ▲4.10MB] [DB: ▲0.00MB] Passed 3 tests
Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 14 new files
Database: no new tables, 6 new options
New WordPress options |
---|
theysaidso_admin_options |
widget_recent-comments |
widget_theysaidso_widget |
widget_recent-posts |
db_upgraded |
can_compress_scripts |
Browser metrics Passed 4 tests
Checking browser requirements for txt2img (山寨长微博)
Minimal impact on browser resources
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,789 ▲28 | 14.35 ▼0.26 | 1.68 ▲0.11 | 43.43 ▲1.73 |
Dashboard /wp-admin | 2,192 ▲15 | 5.56 ▼0.10 | 83.40 ▼3.86 | 36.92 ▼7.54 |
Posts /wp-admin/edit.php | 2,100 ▼0 | 1.97 ▼0.03 | 36.58 ▼0.49 | 29.90 ▼4.47 |
Add New Post /wp-admin/post-new.php | 1,526 ▼2 | 22.99 ▼0.06 | 602.38 ▼66.54 | 53.45 ▼10.04 |
Media Library /wp-admin/upload.php | 1,400 ▼3 | 4.19 ▲0.08 | 94.19 ▼10.89 | 44.03 ▼3.10 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 75% from 4 tests
🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
The following items require your attention
- The uninstall procedure has failed, leaving 6 options in the database
- db_upgraded
- widget_theysaidso_widget
- can_compress_scripts
- theysaidso_admin_options
- widget_recent-comments
- widget_recent-posts
Smoke tests 50% from 4 tests
Server-side errors Passed 1 test
🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Everything seems fine, however this is by no means an exhaustive test
SRP 0% 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
Almost there! Just fix the following items
- 1× PHP files output text when accessed directly:
- > /wp-content/plugins/txt2img/txt2img_generater.php
- 10× PHP files trigger server errors when accessed directly:
- > PHP Notice
Trying to access array offset on value of type bool in wp-content/plugins/txt2img/txt2img_generater.php on line 9
- > PHP Notice
Trying to access array offset on value of type bool in wp-content/plugins/txt2img/txt2img_generater.php on line 10
- > PHP Warning
imagettftext(): Could not find/open font in wp-content/plugins/txt2img/txt2img_generater.php on line 16
- > PHP Notice
Undefined index: txt2img_pid in wp-content/plugins/txt2img/txt2img_generater.php on line 4
- > PHP Notice
Trying to access array offset on value of type bool in wp-content/plugins/txt2img/txt2img_generater.php on line 10
- > PHP Warning
imagettfbbox(): Could not find/open font in wp-content/plugins/txt2img/txt2img_generater.php on line 8
- > PHP Notice
Trying to access array offset on value of type bool in wp-content/plugins/txt2img/txt2img_generater.php on line 9
- > PHP Warning
imagettftext(): Could not find/open font in wp-content/plugins/txt2img/txt2img_generater.php on line 15
- > PHP Fatal error
Uncaught Error: Call to undefined function add_action() in wp-content/plugins/txt2img/txt2img.php:17
- > PHP Notice
Undefined index: txt2img_content in wp-content/plugins/txt2img/txt2img_generater.php on line 5
- > PHP Notice
User-side errors Passed 1 test
🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser issues were found
Optimizations
Plugin configuration 97% from 29 tests
readme.txt 94% from 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
These attributes need your attention:
- Screenshots: These screenshots have no corresponding images in /assets: #1 (Share to weibo while editing published post/page.), #2 (Preview the image generated from the post.)
txt2img/txt2img.php Passed 13 tests
The principal PHP file in "txt2img (山寨长微博)" v. 1.2.1 is loaded by WordPress automatically on each request
106 characters long description:
Convert WordPress post/page into image and share on Weibo. 把 WordPress 文章转发成新浪长微博。
Code Analysis Passed 3 tests
File types Passed 1 test
🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Everything looks great! No dangerous files found in this plugin256 lines of code in 3 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 2 | 14 | 17 | 228 |
PO File | 1 | 6 | 6 | 28 |
PHP code Passed 2 tests
This plugin's cyclomatic complexity and code structure detailed below
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.08 |
Average class complexity | 0.00 |
▷ Minimum class complexity | 0.00 |
▷ Maximum class complexity | 0.00 |
Average method complexity | 0.00 |
▷ Minimum method complexity | 0.00 |
▷ Maximum method complexity | 0.00 |
Code structure | ||
---|---|---|
Namespaces | 0 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 0 | |
▷ Abstract classes | 0 | 0.00% |
▷ Concrete classes | 0 | 0.00% |
▷ Final classes | 0 | 0.00% |
Methods | 0 | |
▷ Static methods | 0 | 0.00% |
▷ Public methods | 0 | 0.00% |
▷ Protected methods | 0 | 0.00% |
▷ Private methods | 0 | 0.00% |
Functions | 5 | |
▷ Named functions | 5 | 100.00% |
▷ Anonymous functions | 0 | 0.00% |
Constants | 0 | |
▷ Global constants | 0 | 0.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
4 compressed PNG files occupy 0.03MB
Potential savings
Compression of 4 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
screenshot-1.png | 5.38KB | 5.41KB | 0.00% |
close.png | 1.05KB | 1.72KB | 0.00% |
weibo.png | 1.00KB | 1.00KB | 0.00% |
screenshot-2.png | 20.94KB | 21.12KB | 0.00% |