Benchmarks
Plugin footprint 83% from 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | Checking the installer triggered no errors
This plugin's installer ran successfully
Server metrics [RAM: ▼0.69MB] [CPU: ▲0.09ms] Passed 4 tests
This is a short check of server-side resources used by tokpw Short URLs
No issues were detected with server-side resource usage
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.46 ▲0.00 | 36.63 ▼1.56 |
Dashboard /wp-admin | 3.31 ▲0.01 | 49.49 ▲1.96 |
Posts /wp-admin/edit.php | 3.36 ▲0.01 | 45.94 ▼1.60 |
Add New Post /wp-admin/post-new.php | 3.10 ▼2.79 | 165.84 ▲70.25 |
Media Library /wp-admin/upload.php | 3.23 ▲0.01 | 33.73 ▲1.55 |
Server storage [IO: ▲0.01MB] [DB: ▲0.00MB] Passed 3 tests
Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 4 new files
Database: no new tables, 6 new options
New WordPress options |
---|
widget_recent-comments |
can_compress_scripts |
theysaidso_admin_options |
db_upgraded |
widget_theysaidso_widget |
widget_recent-posts |
Browser metrics Passed 4 tests
Checking browser requirements for tokpw Short URLs
Minimal impact on browser resources
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,825 ▲54 | 13.39 ▼0.98 | 1.75 ▼0.23 | 40.26 ▼5.31 |
Dashboard /wp-admin | 2,206 ▲18 | 4.85 ▼1.04 | 110.59 ▼5.57 | 42.21 ▼0.03 |
Posts /wp-admin/edit.php | 2,089 ▼3 | 1.99 ▼0.05 | 39.57 ▲2.90 | 34.32 ▼1.39 |
Add New Post /wp-admin/post-new.php | 1,520 ▼12 | 23.35 ▲0.21 | 652.53 ▲5.91 | 48.43 ▼2.17 |
Media Library /wp-admin/upload.php | 1,382 ▼9 | 4.29 ▲0.11 | 95.30 ▼8.81 | 40.94 ▼3.76 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 75% from 4 tests
🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
You still need to fix the following
- This plugin did not uninstall successfully, leaving 6 options in the database
- widget_recent-posts
- widget_recent-comments
- theysaidso_admin_options
- widget_theysaidso_widget
- can_compress_scripts
- db_upgraded
Smoke tests 50% from 4 tests
Server-side errors Passed 1 test
🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Good news, no errors were detected
SRP 0% 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
- 1× PHP files output text when accessed directly:
- > /wp-content/plugins/tokpw-safe-url-shortener/template/public.tpl.php
- 6× PHP files trigger server-side errors or warnings when accessed directly:
- > PHP Fatal error
Uncaught Error: Call to undefined function __() in wp-content/plugins/tokpw-safe-url-shortener/template/settings.tpl.php:8
- > PHP Notice
Undefined variable: opt in wp-content/plugins/tokpw-safe-url-shortener/template/public.tpl.php on line 2
- > PHP Fatal error
Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/tokpw-safe-url-shortener/tokpw_shorturl.php:12
- > PHP Notice
Trying to access array offset on value of type null in wp-content/plugins/tokpw-safe-url-shortener/template/public.tpl.php on line 9
- > PHP Notice
Trying to access array offset on value of type null in wp-content/plugins/tokpw-safe-url-shortener/template/public.tpl.php on line 2
- > PHP Notice
Undefined variable: opt in wp-content/plugins/tokpw-safe-url-shortener/template/public.tpl.php on line 9
- > PHP Fatal error
User-side errors Passed 1 test
🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
There were no browser issues found
Optimizations
Plugin configuration 93% from 29 tests
readme.txt 94% from 16 tests
The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
Attributes that need to be fixed:
- Tags: Too many tags (12 tag instead of maximum 10); only the first 5 tags are used in your directory listing
tokpw-safe-url-shortener/tokpw_shorturl.php 92% from 13 tests
"tokpw Short URLs" version 0.2's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
You should first fix the following items:
- Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("tokpw-safe-url-shortener.php" instead of "tokpw_shorturl.php")
Code Analysis Passed 3 tests
File types Passed 1 test
🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
There were no executable files found in this plugin199 lines of code in 3 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 3 | 46 | 70 | 199 |
PHP code Passed 2 tests
This is a short overview of cyclomatic complexity and code structure for this plugin
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.38 |
Average class complexity | 14.00 |
▷ Minimum class complexity | 14.00 |
▷ Maximum class complexity | 14.00 |
Average method complexity | 4.25 |
▷ 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 | 4 | |
▷ Static methods | 0 | 0.00% |
▷ Public methods | 4 | 100.00% |
▷ Protected methods | 0 | 0.00% |
▷ Private methods | 0 | 0.00% |
Functions | 4 | |
▷ Named functions | 4 | 100.00% |
▷ Anonymous functions | 0 | 0.00% |
Constants | 3 | |
▷ Global constants | 2 | 66.67% |
▷ Class constants | 1 | 33.33% |
▷ Public constants | 1 | 100.00% |
Plugin size Passed 2 tests
Image compression Passed 2 tests
Often times overlooked, PNG files can occupy unnecessary space in your plugin
There were not PNG files found in your plugin