Benchmarks
Plugin footprint Passed 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Install script ran successfully
Server metrics [RAM: ▲0.09MB] [CPU: ▲1.68ms] 75% from 4 tests
Analyzing server-side resources used by Plink URL Shortener
Please take the time to fix the following items
- CPU: Try to keep total CPU usage under 500.00ms (currently 1,239.28ms on /wp-admin/admin.php?page=plink_short_link_settings_page)
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 2.90 ▲0.18 | 32.68 ▲6.18 |
Dashboard /wp-admin | 3.13 ▲0.08 | 44.15 ▲7.26 |
Posts /wp-admin/edit.php | 3.24 ▲0.14 | 40.59 ▼0.27 |
Add New Post /wp-admin/post-new.php | 5.50 ▲0.07 | 2,697.66 ▲1,511.68 |
Media Library /wp-admin/upload.php | 3.07 ▲0.07 | 35.73 ▼6.43 |
Statistics /wp-admin/admin.php?page=plink_short_link_settings_page | 3.04 | 1,239.28 |
Settings /wp-admin/admin.php?page=plink_short_link_settings_page2 | 3.06 | 29.91 |
Server storage [IO: ▲0.30MB] [DB: ▲0.00MB] Passed 3 tests
How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 25 new files
Database: no new tables, no new options
Browser metrics Passed 4 tests
Plink URL Shortener: an overview of browser usage
There were no issues detected in relation to browser resource usage
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 3,715 ▲133 | 16.34 ▲0.80 | 9.64 ▼0.17 | 48.77 ▲4.35 |
Dashboard /wp-admin | 2,965 ▲112 | 6.68 ▲0.75 | 134.70 ▼2.62 | 114.89 ▲15.49 |
Posts /wp-admin/edit.php | 2,746 ▲40 | 2.78 ▲0.09 | 62.91 ▼1.66 | 87.28 ▼5.52 |
Add New Post /wp-admin/post-new.php | 1,721 ▼132 | 19.13 ▲0.06 | 375.00 ▲11.07 | 122.24 ▲13.54 |
Media Library /wp-admin/upload.php | 1,759 ▼16 | 5.34 ▲0.35 | 127.40 ▼29.25 | 124.91 ▲12.28 |
Statistics /wp-admin/admin.php?page=plink_short_link_settings_page | 1,249 | 2.90 | 67.68 | 85.28 |
Settings /wp-admin/admin.php?page=plink_short_link_settings_page2 | 1,289 | 2.69 | 53.67 | 85.63 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests
🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
Uninstaller ran successfully
Smoke tests 50% from 4 tests
Server-side errors 0% from 1 test
🔹 Test weight: 20 | A smoke test targeting server-side errors
These server-side errors were triggered
- > GET request to /wp-admin/admin.php?page=plink_short_link_settings_page
- > Warning in wp-includes/class-wp-hook.php+303
call_user_func_array() expects parameter 1 to be a valid callback, function 'http://wp.com/wp-content/plugins/plink-url-shortener/icon.png' not found or invalid function name
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
Please fix the following items
- 5× GET requests to PHP files have triggered server-side errors or warnings:
- > PHP Fatal error
Uncaught Error: Call to undefined function __() in wp-content/plugins/plink-url-shortener/template/public.tpl.php:3
- > PHP Fatal error
Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/plink-url-shortener/plink_shorturl.php:13
- > PHP Notice
Trying to access array offset on value of type null in wp-content/plugins/plink-url-shortener/template/public.tpl.php on line 2
- > PHP Fatal error
Uncaught Error: Call to undefined function __() in wp-content/plugins/plink-url-shortener/template/settings.tpl.php:2
- > PHP Notice
Undefined variable: opt in wp-content/plugins/plink-url-shortener/template/public.tpl.php on line 2
- > PHP Fatal error
User-side errors Passed 1 test
🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine on the user side
Optimizations
Plugin configuration 87% from 29 tests
readme.txt 88% from 16 tests
The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
These attributes need your attention:
- Screenshots: These screenshots do not have images: #1 (Settings), #2 (The Get Shortlink button in Post Editor), #3 (Show Shortlink & Social Sharing Buttons), #4 (Statistics)
- Tags: Please reduce the number of tags, currently 13 tag instead of maximum 10
plink-url-shortener/plink_shorturl.php 85% from 13 tests
The main PHP script in "Plink URL Shortener" version 1.0 is automatically included on every request by WordPress
The following require your attention:
- Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6
- Main file name: It is recommended to name the main PHP file as the plugin slug ("plink-url-shortener.php" instead of "plink_shorturl.php")
Code Analysis Passed 3 tests
File types Passed 1 test
🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
There were no executable files found in this plugin615 lines of code in 5 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 3 | 93 | 51 | 385 |
PO File | 2 | 92 | 98 | 230 |
PHP code Passed 2 tests
An overview of cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.25 |
Average class complexity | 18.00 |
▷ Minimum class complexity | 18.00 |
▷ Maximum class complexity | 18.00 |
Average method complexity | 3.43 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 8.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 | 7 | |
▷ Static methods | 0 | 0.00% |
▷ Public methods | 7 | 100.00% |
▷ Protected methods | 0 | 0.00% |
▷ Private methods | 0 | 0.00% |
Functions | 15 | |
▷ Named functions | 15 | 100.00% |
▷ Anonymous functions | 0 | 0.00% |
Constants | 4 | |
▷ Global constants | 3 | 75.00% |
▷ Class constants | 1 | 25.00% |
▷ Public constants | 1 | 100.00% |
Plugin size Passed 1 test
Image compression Passed 1 test
PNG files should be compressed to save space and minimize bandwidth usage
17 compressed PNG files occupy 0.27MB
Potential savings
Compression of 5 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
icons/blogger-32.png | 0.79KB | 0.79KB | 0.25% |
icons/wordpress-32.png | 1.01KB | 1.00KB | ▼ 0.68% |
icons/evernote-32.png | 0.87KB | 0.87KB | ▼ 0.56% |
icons/mail-32.png | 0.82KB | 0.82KB | ▼ 0.59% |
icons/google-plus-32.png | 0.65KB | 0.65KB | 0.30% |