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.17MB] [CPU: ▼0.32ms] Passed 4 tests
A check of server-side resources used by Click To Tweet
Normal server usage
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.62 ▲0.16 | 43.56 ▼1.50 |
Dashboard /wp-admin | 3.47 ▲0.17 | 52.26 ▼1.66 |
Posts /wp-admin/edit.php | 3.58 ▲0.23 | 56.09 ▲5.06 |
Add New Post /wp-admin/post-new.php | 6.07 ▲0.18 | 96.39 ▼2.66 |
Media Library /wp-admin/upload.php | 3.39 ▲0.16 | 40.14 ▲4.55 |
Click To Tweet /wp-admin/options-general.php?page=ctt | 3.36 | 31.25 |
Server storage [IO: ▲0.80MB] [DB: ▲0.00MB] Passed 3 tests
Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 61 new files
Database: no new tables, 9 new options
New WordPress options |
---|
ctt_image_setting |
can_compress_scripts |
widget_theysaidso_widget |
db_upgraded |
ctt_hint_box |
theysaidso_admin_options |
widget_recent-comments |
ctt_box_setting |
widget_recent-posts |
Browser metrics Passed 4 tests
Checking browser requirements for Click To Tweet
There were no issues detected in relation to browser resource usage
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,801 ▲55 | 14.22 ▼0.13 | 2.33 ▼0.02 | 47.73 ▲1.13 |
Dashboard /wp-admin | 2,200 ▲23 | 5.57 ▼0.10 | 85.83 ▼10.61 | 53.37 ▲9.61 |
Posts /wp-admin/edit.php | 2,111 ▲14 | 2.04 ▲0.02 | 39.83 ▲3.53 | 49.06 ▲12.42 |
Add New Post /wp-admin/post-new.php | 1,533 ▼2 | 23.06 ▲4.62 | 597.81 ▼77.36 | 43.06 ▼36.25 |
Media Library /wp-admin/upload.php | 1,402 ▲5 | 4.27 ▲0.03 | 138.36 ▲27.38 | 52.10 ▲6.13 |
Click To Tweet /wp-admin/options-general.php?page=ctt | 774 | 2.07 | 35.48 | 47.41 |
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
It is recommended to fix the following
- Zombie WordPress options detected upon uninstall: 9 options
- widget_theysaidso_widget
- widget_recent-comments
- ctt_box_setting
- theysaidso_admin_options
- can_compress_scripts
- ctt_image_setting
- ctt_hint_box
- db_upgraded
- widget_recent-posts
Smoke tests 50% from 4 tests
Server-side errors Passed 1 test
🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Everything seems fine, however this is by no means an exhaustive test
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
Almost there! Just fix the following items
- 40× PHP files trigger server errors when accessed directly (only 10 are shown):
- > PHP Fatal error
Uncaught Error: Call to undefined function get_option() in wp-content/plugins/click-to-tweet/view/ctt-settings.php:3
- > PHP Notice
Undefined variable: bopt in wp-content/plugins/click-to-tweet/view/author-box.php on line 26
- > PHP Notice
Trying to access array offset on value of type null in wp-content/plugins/click-to-tweet/view/author-box.php on line 28
- > PHP Notice
Undefined variable: bopt in wp-content/plugins/click-to-tweet/view/author-box.php on line 29
- > PHP Notice
Undefined variable: bopt in wp-content/plugins/click-to-tweet/view/author-box.php on line 12
- > PHP Notice
Trying to access array offset on value of type null in wp-content/plugins/click-to-tweet/view/author-box.php on line 12
- > PHP Notice
Trying to access array offset on value of type null in wp-content/plugins/click-to-tweet/view/author-box.php on line 28
- > PHP Fatal error
Uncaught Error: Call to undefined function get_option() in wp-content/plugins/click-to-tweet/view/hint-box.php:1
- > PHP Notice
Trying to access array offset on value of type null in wp-content/plugins/click-to-tweet/view/author-box.php on line 10
- > PHP Notice
Trying to access array offset on value of type null in wp-content/plugins/click-to-tweet/view/author-box.php on line 13
- > PHP Fatal error
User-side errors 0% from 1 test
🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
These are user-side errors you should fix
- > GET request to /wp-admin/options-general.php?page=ctt
- > Javascript (severe) in unknown
/wp-admin/options-general.php?page=ctt 152:40 Uncaught TypeError: Cannot read properties of null (reading 'focus')
Optimizations
Plugin configuration 93% from 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
8 plugin tags: twitter plugin, click to tweet, share, clicktotweet, social media...
click-to-tweet/ctt.php 85% from 13 tests
The principal PHP file in "Click To Tweet" v. 2.0.14 is loaded by WordPress automatically on each request
Please make the necessary changes and fix the following:
- Description: Please keep the plugin description shorter than 140 characters (currently 150 characters long)
- Main file name: The principal plugin file should be the same as the plugin slug ("click-to-tweet.php" instead of "ctt.php")
Code Analysis Passed 3 tests
File types Passed 1 test
🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
No dangerous file extensions were detected5,646 lines of code in 33 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 17 | 436 | 728 | 3,109 |
PO File | 8 | 247 | 300 | 1,111 |
CSS | 4 | 174 | 109 | 1,000 |
JavaScript | 2 | 31 | 4 | 350 |
Markdown | 1 | 23 | 0 | 50 |
JSON | 1 | 0 | 0 | 26 |
PHP code Passed 2 tests
A short review of cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.29 |
Average class complexity | 17.83 |
▷ Minimum class complexity | 1.00 |
▷ Maximum class complexity | 88.00 |
Average method complexity | 2.78 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 21.00 |
Code structure | ||
---|---|---|
Namespaces | 0 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 18 | |
▷ Abstract classes | 2 | 11.11% |
▷ Concrete classes | 16 | 88.89% |
▷ Final classes | 0 | 0.00% |
Methods | 174 | |
▷ Static methods | 16 | 9.20% |
▷ Public methods | 123 | 70.69% |
▷ Protected methods | 2 | 1.15% |
▷ Private methods | 49 | 28.16% |
Functions | 2 | |
▷ Named functions | 2 | 100.00% |
▷ Anonymous functions | 0 | 0.00% |
Constants | 2 | |
▷ Global constants | 1 | 50.00% |
▷ Class constants | 1 | 50.00% |
▷ Public constants | 1 | 100.00% |
Plugin size Passed 2 tests
Image compression Passed 2 tests
Often times overlooked, PNG files can occupy unnecessary space in your plugin
11 PNG files occupy 0.04MB with 0.01MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
css/img/tw.png | 5.64KB | 3.36KB | ▼ 40.50% |
images/sprite-twitter.png | 9.13KB | 5.65KB | ▼ 38.13% |
images/pattern.png | 0.19KB | 0.19KB | ▼ 0.52% |
images/editor-ticon.png | 1.45KB | 0.59KB | ▼ 59.30% |
images/down-arrow-1.png | 1.25KB | 0.87KB | ▼ 30.60% |