Benchmarks
Plugin footprint 83% from 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed gracefully, with no errors
Server metrics [RAM: ▲0.21MB] [CPU: ▲3.17ms] Passed 4 tests
This is a short check of server-side resources used by API Fetch Twitter
Normal server usage
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.65 ▲0.19 | 39.05 ▲2.59 |
Dashboard /wp-admin | 3.56 ▲0.25 | 52.90 ▲6.21 |
Posts /wp-admin/edit.php | 3.61 ▲0.25 | 51.56 ▲5.30 |
Add New Post /wp-admin/post-new.php | 6.09 ▲0.21 | 100.12 ▲1.80 |
Media Library /wp-admin/upload.php | 3.42 ▲0.19 | 37.82 ▲2.98 |
Server storage [IO: ▲0.49MB] [DB: ▲0.00MB] Passed 3 tests
A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 72 new files
Database: no new tables, 7 new options
New WordPress options |
---|
db_upgraded |
can_compress_scripts |
widget_theysaidso_widget |
widget_recent-posts |
widget_recent-comments |
api_fetch_twitter_options |
theysaidso_admin_options |
Browser metrics Passed 4 tests
A check of browser resources used by API Fetch Twitter
Normal browser usage
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,931 ▲196 | 13.64 ▼0.72 | 5.40 ▲3.66 | 36.67 ▲0.41 |
Dashboard /wp-admin | 2,222 ▲33 | 5.86 ▲0.97 | 107.97 ▼9.93 | 40.80 ▼0.96 |
Posts /wp-admin/edit.php | 2,105 ▲16 | 2.01 ▼0.02 | 41.12 ▲6.71 | 34.55 ▲2.15 |
Add New Post /wp-admin/post-new.php | 1,528 ▼5 | 17.49 ▼5.59 | 609.77 ▼74.42 | 49.95 ▼4.92 |
Media Library /wp-admin/upload.php | 1,404 ▲13 | 4.16 ▼0.11 | 93.91 ▼7.20 | 41.92 ▼4.54 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 75% from 4 tests
🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
- The uninstall procedure has failed, leaving 7 options in the database
- widget_recent-comments
- widget_recent-posts
- widget_theysaidso_widget
- db_upgraded
- api_fetch_twitter_options
- can_compress_scripts
- theysaidso_admin_options
Smoke tests 50% from 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)
The smoke test was a success, however most plugin functionality was not tested
SRP 0% 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
The following issues need your attention
- 1× PHP files perform the action of outputting non-empty strings when accessed directly:
- > /wp-content/plugins/api-fetch-twitter/public/partials/api-fetch-twitter-public-display.php
- 3× PHP files trigger server errors when accessed directly:
- > PHP Fatal error
Uncaught Error: Class 'Abraham\\TwitterOAuth\\Config' not found in wp-content/plugins/api-fetch-twitter/vendor/abraham/twitteroauth/src/TwitterOAuth.php:21
- > PHP Fatal error
Uncaught Error: Class 'Abraham\\TwitterOAuth\\SignatureMethod' not found in wp-content/plugins/api-fetch-twitter/vendor/abraham/twitteroauth/src/HmacSha1.php:19
- > PHP Fatal error
Uncaught Error: Call to undefined function settings_fields() in wp-content/plugins/api-fetch-twitter/admin/partials/api-fetch-twitter-admin-display.php:20
- > PHP Fatal error
User-side errors Passed 1 test
🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There were no browser issues found
Optimizations
Plugin configuration 97% from 29 tests
readme.txt 94% from 16 tests
The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
Attributes that require attention:
- Plugin Name: You should set the name of your plugin on the first line (
=== api-fetch-twitter ===
)
api-fetch-twitter/api-fetch-twitter.php Passed 13 tests
The main PHP script in "API Fetch Twitter" version 1.0.0 is automatically included on every request by WordPress
37 characters long description:
Fetch and Display Tweets and Retweets
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
Good job! No executable or dangerous file extensions detected2,949 lines of code in 49 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 36 | 753 | 1,613 | 2,181 |
JSON | 4 | 0 | 0 | 263 |
JavaScript | 2 | 29 | 54 | 122 |
Sass | 1 | 36 | 0 | 108 |
CSS | 2 | 2 | 5 | 102 |
Markdown | 2 | 29 | 0 | 78 |
PO File | 1 | 18 | 20 | 56 |
XML | 1 | 0 | 0 | 39 |
PHP code Passed 2 tests
A brief analysis of cyclomatic complexity and code structure for this plugin
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.34 |
Average class complexity | 11.50 |
▷ Minimum class complexity | 1.00 |
▷ Maximum class complexity | 59.00 |
Average method complexity | 2.31 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 18.00 |
Code structure | ||
---|---|---|
Namespaces | 5 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 24 | |
▷ Abstract classes | 1 | 4.17% |
▷ Concrete classes | 23 | 95.83% |
▷ Final classes | 0 | 0.00% |
Methods | 180 | |
▷ Static methods | 47 | 26.11% |
▷ Public methods | 149 | 82.78% |
▷ Protected methods | 1 | 0.56% |
▷ Private methods | 30 | 16.67% |
Functions | 8 | |
▷ Named functions | 4 | 50.00% |
▷ Anonymous functions | 4 | 50.00% |
Constants | 4 | |
▷ Global constants | 1 | 25.00% |
▷ Class constants | 3 | 75.00% |
▷ Public constants | 0 | 0.00% |
Plugin size Passed 2 tests
Image compression Passed 2 tests
PNG files should be compressed to save space and minimize bandwidth usage
9 PNG files occupy 0.01MB with 0.01MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
public/images/favorite.png | 1.30KB | 0.29KB | ▼ 77.65% |
public/images/retweet_hover.png | 1.07KB | 0.14KB | ▼ 87.10% |
public/images/reply_hover.png | 1.13KB | 0.18KB | ▼ 83.65% |
public/images/favorite_hover.png | 1.28KB | 0.27KB | ▼ 78.50% |
public/images/favorite_on.png | 1.31KB | 0.33KB | ▼ 74.57% |