Benchmarks
Plugin footprint 58% from 16 tests
Installer 0% from 1 test
🔺 Critical test (weight: 50) | The install procedure must perform silently
Please fix the following installer errors
- Install procedure validation failed for this plugin
- > Notice in wp-content/plugins/u-tweets/utweets.php+34
Trying to access array offset on value of type bool
Server metrics [RAM: ▼1.86MB] [CPU: ▼190.74ms] Passed 4 tests
Analyzing server-side resources used by U-Tweets
This plugin has minimal impact on server resources
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 1.77 ▼1.06 | 6.45 ▼29.51 |
Dashboard /wp-admin | 1.79 ▼1.26 | 6.07 ▼37.45 |
Posts /wp-admin/edit.php | 1.79 ▼1.31 | 6.28 ▼38.37 |
Add New Post /wp-admin/post-new.php | 1.79 ▼3.64 | 6.64 ▼655.88 |
Media Library /wp-admin/upload.php | 1.79 ▼1.21 | 6.18 ▼31.25 |
U-Tweets /wp-admin/options-general.php?page=U-Tweets | 1.79 | 6.65 |
Server storage [IO: ▲0.23MB] [DB: ▲0.00MB] Passed 3 tests
How much does this plugin use your filesystem and database?
This plugin was installed successfully
Filesystem: 19 new files
Database: no new tables, no new options
Browser metrics Passed 4 tests
U-Tweets: an overview of browser usage
This plugin has a minimal impact on browser resources
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 3,834 ▲238 | 16.56 ▲0.98 | 11.31 ▲3.58 | 48.76 ▼4.18 |
Dashboard /wp-admin | 2,992 ▲61 | 5.92 ▼0.00 | 131.77 ▼15.29 | 119.99 ▲4.14 |
Posts /wp-admin/edit.php | 2,761 ▲22 | 2.69 ▼0.00 | 66.58 ▲4.46 | 98.92 ▲2.20 |
Add New Post /wp-admin/post-new.php | 1,686 ▼186 | 18.89 ▼0.20 | 357.03 ▲7.34 | 104.01 ▼6.99 |
Media Library /wp-admin/upload.php | 1,829 ▲16 | 5.01 ▲0.01 | 150.81 ▲11.31 | 118.97 ▼6.30 |
U-Tweets /wp-admin/options-general.php?page=U-Tweets | 1,185 | 2.21 | 57.92 | 78.55 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 75% from 4 tests
🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
- Uninstall procedure had uncaught errors
- > Notice in wp-content/plugins/u-tweets/utweets.php+34
Trying to access array offset on value of type bool
Smoke tests 50% from 4 tests
Server-side errors 0% from 1 test
🔹 Test weight: 20 | A smoke test targeting server-side errors
These errors were triggered by the plugin
- 8 occurences, only the last one shown
- > GET request to /wp-admin/options-general.php?page=U-Tweets
- > Notice in wp-content/plugins/u-tweets/lib/admin.php+28
Trying to access array offset on value of type bool
- 2 occurences, only the last one shown
- > GET request to /wp-admin/options-general.php?page=U-Tweets
- > User deprecated in wp-includes/functions.php+5495
has_cap was called with an argument that is deprecated since version 2.0.0! Usage of user levels is deprecated. Use capabilities instead.
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
- 3× GET requests to PHP files trigger server-side errors or Error 500 responses:
- > PHP Fatal error
Uncaught Error: Call to undefined function plugin_basename() in wp-content/plugins/u-tweets/utweets.php:14
- > PHP Fatal error
Uncaught Error: Call to undefined function get_option() in wp-content/plugins/u-tweets/lib/admin.php:24
- > PHP Fatal error
Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/u-tweets/lib/widget.php:12
- > 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 93% from 29 tests
readme.txt 94% from 16 tests
The readme.txt file uses markdown syntax to describe your plugin to the world
These attributes need your attention:
- Screenshots: These screenshots require images: #1 (Twitter OAuth Settings), #2 (Widget options), #3 (Sample Tweets Display)
u-tweets/utweets.php 92% from 13 tests
"U-Tweets" version 1.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
It is important to fix the following:
- Main file name: Name the main plugin file the same as the plugin slug ("u-tweets.php" instead of "utweets.php")
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
Everything looks great! No dangerous files found in this plugin1,234 lines of code in 10 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 6 | 186 | 384 | 887 |
JavaScript | 1 | 27 | 25 | 270 |
PO File | 1 | 27 | 3 | 64 |
Markdown | 1 | 5 | 0 | 11 |
CSS | 1 | 0 | 0 | 2 |
PHP code Passed 2 tests
This is a very shot review of cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.33 |
Average class complexity | 35.25 |
▷ Minimum class complexity | 18.00 |
▷ Maximum class complexity | 66.00 |
Average method complexity | 4.19 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 20.00 |
Code structure | ||
---|---|---|
Namespaces | 0 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 4 | |
▷ Abstract classes | 0 | 0.00% |
▷ Concrete classes | 4 | 100.00% |
▷ Final classes | 0 | 0.00% |
Methods | 43 | |
▷ Static methods | 9 | 20.93% |
▷ Public methods | 21 | 48.84% |
▷ Protected methods | 0 | 0.00% |
▷ Private methods | 22 | 51.16% |
Functions | 5 | |
▷ Named functions | 5 | 100.00% |
▷ Anonymous functions | 0 | 0.00% |
Constants | 7 | |
▷ Global constants | 5 | 71.43% |
▷ Class constants | 2 | 28.57% |
▷ Public constants | 2 | 100.00% |
Plugin size Passed 2 tests
Image compression Passed 2 tests
All PNG images should be compressed to minimize bandwidth usage for end users
3 PNG files occupy 0.14MB with 0.11MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
screenshot-2.png | 71.39KB | 15.08KB | ▼ 78.88% |
screenshot-3.png | 45.71KB | 10.97KB | ▼ 75.99% |
screenshot-1.png | 24.58KB | 5.82KB | ▼ 76.33% |