Benchmarks
Plugin footprint Passed 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Install script ran successfully
Server metrics [RAM: ▼0.01MB] [CPU: ▼283.13ms] Passed 4 tests
Server-side resources used by Twitter Embed
Server-side resource usage in normal parameters
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.57 ▲0.05 | 56.10 ▲8.44 |
Dashboard /wp-admin | 3.43 ▲0.01 | 33.30 ▼1.24 |
Posts /wp-admin/edit.php | 3.66 ▲0.01 | 37.57 ▲1.81 |
Add New Post /wp-admin/post-new.php | 6.90 ▼0.07 | 99.94 ▼1,131.79 |
Media Library /wp-admin/upload.php | 3.31 ▲0.01 | 25.70 ▼1.30 |
Server storage [IO: ▲0.07MB] [DB: ▲0.00MB] Passed 3 tests
Filesystem and database footprint
This plugin installed successfully
Filesystem: 4 new files
Database: no new tables, no new options
Browser metrics Passed 4 tests
An overview of browser requirements for Twitter Embed
Normal browser usage
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 3,795 ▲53 | 16.22 ▲0.57 | 6.69 ▲0.03 | 3.51 ▲1.43 |
Dashboard /wp-admin | 2,892 ▲38 | 6.21 ▼0.06 | 120.43 ▼16.36 | 155.19 ▼6.70 |
Posts /wp-admin/edit.php | 2,685 ▼0 | 3.07 ▼0.17 | 62.73 ▼1.45 | 138.08 ▼3.34 |
Add New Post /wp-admin/post-new.php | 1,711 ▲50 | 20.61 ▲4.75 | 446.61 ▲46.12 | 156.59 ▲2.52 |
Media Library /wp-admin/upload.php | 1,695 ▼6 | 5.48 ▼0.06 | 138.07 ▼0.53 | 189.52 ▼1.25 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests
🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
Uninstall script ran successfully
Smoke tests 75% 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 50% from 2 tests
🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
The following issues need your attention
- 1× PHP files trigger errors when accessed directly with GET requests:
- > PHP Fatal error
Uncaught Error: Call to undefined function add_action() in wp-content/plugins/twitter-embed/twitter-embed.php:21
- > PHP Fatal error
User-side errors Passed 1 test
🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
No browser errors were detected
Optimizations
Plugin configuration 97% from 29 tests
readme.txt 94% from 16 tests
Often overlooked, readme.txt is one of the most important files in your plugin
These attributes need your attention:
- Screenshots: Add images for these screenshots: #1 (This is how your embedded tweets will appear on your blog or site.), #2 (This is how you embed your tweets in the editor -- just a link on it's own line or a shortcode.)
twitter-embed/twitter-embed.php Passed 13 tests
The principal PHP file in "Twitter Embed" v. 1.1.1 is loaded by WordPress automatically on each request
107 characters long description:
Easily embed tweets in your WordPress posts and pages via shortcode, embed HTML or URL on a line by itself.
Code Analysis Passed 3 tests
File types Passed 1 test
🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
No dangerous file extensions were detected40 lines of code in 1 file:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 1 | 11 | 33 | 40 |
PHP code Passed 2 tests
Analyzing cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.29 |
Average class complexity | 7.00 |
▷ Minimum class complexity | 7.00 |
▷ Maximum class complexity | 7.00 |
Average method complexity | 2.50 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 4.00 |
Code structure | ||
---|---|---|
Namespaces | 0 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 1 | |
▷ Abstract classes | 0 | 0.00% |
▷ Concrete classes | 1 | 100.00% |
▷ Final classes | 0 | 0.00% |
Methods | 4 | |
▷ Static methods | 0 | 0.00% |
▷ Public methods | 4 | 100.00% |
▷ Protected methods | 0 | 0.00% |
▷ Private methods | 0 | 0.00% |
Functions | 0 | |
▷ Named functions | 0 | 0.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
All PNG images should be compressed to minimize bandwidth usage for end users
2 PNG files occupy 0.07MB with 0.05MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
screenshot-1.png | 29.36KB | 9.13KB | ▼ 68.89% |
screenshot-2.png | 38.50KB | 11.88KB | ▼ 69.14% |