Benchmarks
Plugin footprint 23% from 16 tests
Installer 0% from 1 test
🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
It is recommended to fix the following installer errors
- This plugin did not install gracefully
- > Deprecated in wp-content/plugins/pay-with-a-tweet/inc/widget.php+43
Methods with the same name as their class will not be constructors in a future version of PHP; Pwt_Widget has a deprecated constructor
Server metrics [RAM: ▼1.70MB] [CPU: ▼48.38ms] Passed 4 tests
Server-side resources used by Pay with a tweet
This plugin has minimal impact on server resources
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 2.28 ▼1.18 | 9.22 ▼28.78 |
Dashboard /wp-admin | 2.30 ▼1.00 | 10.88 ▼36.71 |
Posts /wp-admin/edit.php | 2.31 ▼1.05 | 10.57 ▼39.14 |
Add New Post /wp-admin/post-new.php | 2.31 ▼3.58 | 10.30 ▼88.89 |
Media Library /wp-admin/upload.php | 2.31 ▼0.92 | 10.73 ▼25.46 |
New payment button /wp-admin/admin.php?page=pay-with-a-tweet/admin/pwt-create-button.php | 2.30 | 9.63 |
Manage your buttons /wp-admin/admin.php?page=pay-with-a-tweet/admin/pwt-buttons.php | 2.30 | 9.81 |
Upload files /wp-admin/admin.php?page=pay-with-a-tweet/admin/pwt-upload.php | 2.30 | 9.56 |
Manage files /wp-admin/admin.php?page=pay-with-a-tweet/admin/pwt-files.php | 2.30 | 12.97 |
/wp-admin/admin.php?page=pay-with-a-tweet/admin/pwt-async-upload.php | 2.30 | 11.00 |
Configuration /wp-admin/admin.php?page=pay-with-a-tweet/admin/pwt-config.php | 2.30 | 11.69 |
Server storage [IO: ▲2.16MB] [DB: ▲0.00MB] Passed 3 tests
How much does this plugin use your filesystem and database?
This plugin was installed successfully
Filesystem: 142 new files
Database: 2 new tables, 10 new options
New tables |
---|
wp_pwt_button |
wp_pwt_button_stats |
New WordPress options |
---|
widget_theysaidso_widget |
pay-with-a-tweet_db_version |
widget_pwt_widget |
widget_recent-posts |
pay-with-a-tweet_twitter_consumerkey |
can_compress_scripts |
widget_recent-comments |
db_upgraded |
theysaidso_admin_options |
pay-with-a-tweet_twitter_consumersecret |
Browser metrics Passed 4 tests
Checking browser requirements for Pay with a tweet
This plugin has a minimal impact on browser resources
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,838 ▲103 | 13.25 ▼1.39 | 4.21 ▲2.33 | 39.11 ▼2.18 |
Dashboard /wp-admin | 2,247 ▲58 | 4.94 ▲0.02 | 112.07 ▼10.89 | 67.49 ▲28.11 |
Posts /wp-admin/edit.php | 2,134 ▲48 | 2.01 ▲0.00 | 39.73 ▼0.84 | 32.90 ▼0.99 |
Add New Post /wp-admin/post-new.php | 1,551 ▲37 | 23.09 ▲5.38 | 785.09 ▲142.70 | 56.09 ▲7.56 |
Media Library /wp-admin/upload.php | 1,429 ▲38 | 4.18 ▼0.04 | 98.86 ▼0.85 | 75.15 ▲29.92 |
New payment button /wp-admin/admin.php?page=pay-with-a-tweet/admin/pwt-create-button.php | 1,020 | 4.61 | 43.42 | 59.00 |
Manage your buttons /wp-admin/admin.php?page=pay-with-a-tweet/admin/pwt-buttons.php | 815 | 2.02 | 24.44 | 27.61 |
Upload files /wp-admin/admin.php?page=pay-with-a-tweet/admin/pwt-upload.php | 978 | 2.54 | 42.01 | 31.54 |
Manage files /wp-admin/admin.php?page=pay-with-a-tweet/admin/pwt-files.php | 860 | 2.03 | 23.92 | 25.36 |
/wp-admin/admin.php?page=pay-with-a-tweet/admin/pwt-async-upload.php | 12 | 0.44 | 0.09 | 3.89 |
Configuration /wp-admin/admin.php?page=pay-with-a-tweet/admin/pwt-config.php | 1,425 | 9.36 | 263.41 | 70.69 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 25% from 4 tests
🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
- This plugin cannot be uninstalled
- > User deprecated in wp-includes/functions.php+5546
The called constructor method for WP_Widget class in Pwt_Widget is deprecated since version 4.3.0! Use __construct() instead.
- The uninstall procedure failed, leaving 2 tables in the database
- wp_pwt_button_stats
- wp_pwt_button
- This plugin did not uninstall successfully, leaving 10 options in the database
- pay-with-a-tweet_db_version
- widget_recent-posts
- widget_recent-comments
- pay-with-a-tweet_twitter_consumerkey
- theysaidso_admin_options
- widget_theysaidso_widget
- pay-with-a-tweet_twitter_consumersecret
- db_upgraded
- widget_pwt_widget
- can_compress_scripts
Smoke tests 50% from 4 tests
Server-side errors 0% from 1 test
🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Smoke test failed, please fix the following
- 6 occurences, only the last one shown
- > GET request to /wp-admin/admin.php?page=pay-with-a-tweet/admin/pwt-config.php
- > User deprecated in wp-includes/functions.php+5546
The called constructor method for WP_Widget class in Pwt_Widget is deprecated since version 4.3.0! Use __construct() instead.
- 6 occurences, only the last one shown
- > GET request to /wp-admin/admin.php?page=pay-with-a-tweet/admin/pwt-config.php
- > User deprecated in wp-includes/functions.php+5453
Function add_object_page is deprecated since version 4.5.0! Use add_menu_page() instead.
- 77 occurences, only the last one shown
- > GET request to /wp-admin/admin.php?page=pay-with-a-tweet/admin/pwt-config.php
- > User deprecated in wp-includes/functions.php+5737
Function has_cap was called with an argument that is deprecated since version 2.0.0! Usage of user levels is deprecated. Use capabilities instead.
- > GET request to /wp-admin/admin.php?page=pay-with-a-tweet/admin/pwt-create-button.php
- > Notice in wp-content/plugins/pay-with-a-tweet/admin/pwt-create-button.php+92
Undefined variable: key
- > GET request to /wp-admin/admin.php?page=pay-with-a-tweet/admin/pwt-create-button.php
- > Notice in wp-content/plugins/pay-with-a-tweet/admin/pwt-create-button.php+126
getimagesize(): Read error!
- 3 occurences, only the last one shown
- > GET request to /wp-admin/admin.php?page=pay-with-a-tweet/admin/pwt-files.php
- > Notice in wp-content/plugins/pay-with-a-tweet/admin/pwt-files.php+20
Undefined index: action
- 2 occurences, only the last one shown
- > GET request to /wp-admin/admin.php?page=pay-with-a-tweet/admin/pwt-files.php
- > Notice in wp-content/plugins/pay-with-a-tweet/admin/pwt-files.php+49
Undefined variable: message
- > GET request to /wp-admin/admin.php?page=pay-with-a-tweet/admin/pwt-config.php
- > User deprecated in wp-includes/functions.php+5463
Function screen_icon is deprecated since version 3.8.0 with no alternative available.
- > GET request to /wp-admin/admin.php?page=pay-with-a-tweet/admin/pwt-config.php
- > User deprecated in wp-includes/functions.php+5463
Function get_screen_icon is deprecated since version 3.8.0 with no alternative available.
SRP 50% from 2 tests
🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please take a closer look at the following
- 13× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
- > PHP Fatal error
Uncaught Error: Call to undefined function get_option() in wp-content/plugins/pay-with-a-tweet/admin/pwt-config.php:33
- > PHP Fatal error
Uncaught Error: Call to undefined function add_action() in wp-content/plugins/pay-with-a-tweet/inc/widget.php:21
- > PHP Fatal error
Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/pay-with-a-tweet/admin/pwt-async-upload.php:18
- > PHP Warning
Use of undefined constant PWT_PLUGIN_UPLOAD_DIR - assumed 'PWT_PLUGIN_UPLOAD_DIR' (this will throw an Error in a future version of PHP) in wp-content/plugins/pay-with-a-tweet/admin/pwt-files.php on line 39
- > PHP Notice
Undefined index: action in wp-content/plugins/pay-with-a-tweet/admin/pwt-buttons.php on line 20
- > PHP Fatal error
Uncaught Error: Call to undefined function __() in wp-content/plugins/pay-with-a-tweet/admin/pwt-files.php:46
- > PHP Fatal error
Uncaught Error: Call to undefined function current_user_can() in wp-content/plugins/pay-with-a-tweet/admin/pwt-upload.php:18
- > PHP Fatal error
Uncaught Error: Call to undefined function __() in wp-content/plugins/pay-with-a-tweet/admin/pwt-buttons.php:56
- > PHP Notice
Undefined index: action in wp-content/plugins/pay-with-a-tweet/admin/pwt-files.php on line 20
- > PHP Fatal error
Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/pay-with-a-tweet/inc/shortcode.php:51
- > PHP Fatal error
User-side errors Passed 1 test
🔹 Test weight: 20 | A shallow check that no browser errors were triggered
There were no browser issues found
Optimizations
Plugin configuration 86% from 29 tests
readme.txt 81% from 16 tests
The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
These attributes need your attention:
- Donate link: Invalid url: ""
- Tags: Please reduce the number of tags, currently 15 tag instead of maximum 10
- Screenshots: Add images for these screenshots: #1 (Configuration screen), #2 (Manage files), #3 (Upload files), #4 (Upload files 2), #5 (Manage buttons), #6 (New button), #7 (Widget)
pay-with-a-tweet/pay-with-a-tweet.php 92% from 13 tests
The main PHP script in "Pay with a tweet" version 1.0.5 is automatically included on every request by WordPress
Please take the time to fix the following:
- Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 289 characters long)
Code Analysis Passed 3 tests
File types Passed 1 test
🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
There were no executable files found in this plugin24,460 lines of code in 92 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
JavaScript | 38 | 2,391 | 2,555 | 10,109 |
HTML | 26 | 2 | 0 | 5,296 |
CSS | 8 | 115 | 42 | 5,017 |
XML | 1 | 1 | 0 | 1,973 |
PHP | 15 | 399 | 675 | 1,598 |
PO File | 2 | 96 | 110 | 247 |
SVG | 2 | 1 | 24 | 220 |
PHP code Passed 2 tests
A brief analysis of cyclomatic complexity and code structure for this plugin
No complexity issues detected
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.29 |
Average class complexity | 8.15 |
▷ Minimum class complexity | 1.00 |
▷ Maximum class complexity | 29.00 |
Average method complexity | 2.19 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 9.00 |
Code structure | ||
---|---|---|
Namespaces | 0 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 13 | |
▷ Abstract classes | 2 | 15.38% |
▷ Concrete classes | 11 | 84.62% |
▷ Final classes | 0 | 0.00% |
Methods | 82 | |
▷ Static methods | 10 | 12.20% |
▷ Public methods | 71 | 86.59% |
▷ Protected methods | 2 | 2.44% |
▷ Private methods | 9 | 10.98% |
Functions | 15 | |
▷ Named functions | 15 | 100.00% |
▷ Anonymous functions | 0 | 0.00% |
Constants | 8 | |
▷ Global constants | 8 | 100.00% |
▷ Class constants | 0 | 0.00% |
▷ Public constants | 0 | 0.00% |
Plugin size 50% from 2 tests
Image compression 50% from 2 tests
It is recommended to compress PNG files in your plugin to minimize bandwidth usage
36 PNG files occupy 0.69MB with 0.35MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
docs/img/icons/ok.png | 3.60KB | 0.90KB | ▼ 74.95% |
docs/img/icons/visibility_protected.png | 0.75KB | 0.98KB | 0.00% |
docs/img/icons/file-php.png | 3.92KB | 1.22KB | ▼ 68.78% |
docs/img/iviewer/iviewer.zoom_zero.png | 1.07KB | 0.14KB | ▼ 87.17% |
docs/img/icons/function.png | 0.33KB | 0.27KB | ▼ 19.23% |