Benchmarks
Plugin footprint 40% from 16 tests
Installer 0% from 1 test
🔺 Critical test (weight: 50) | The install procedure must perform silently
It is recommended to fix the following installer errors
- Install procedure had errors
- > Deprecated in wp-content/plugins/randomtext/randomtext.php+30
Methods with the same name as their class will not be constructors in a future version of PHP; randomtext has a deprecated constructor
Server metrics [RAM: ▼1.83MB] [CPU: ▼186.30ms] Passed 4 tests
An overview of server-side resources used by Random Text
Server-side resource usage in normal parameters
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 1.80 ▼1.03 | 5.01 ▼31.95 |
Dashboard /wp-admin | 1.82 ▼1.24 | 4.73 ▼41.82 |
Posts /wp-admin/edit.php | 1.82 ▼1.29 | 19.99 ▼21.83 |
Add New Post /wp-admin/post-new.php | 1.82 ▼3.61 | 6.37 ▼636.46 |
Media Library /wp-admin/upload.php | 1.82 ▼1.19 | 5.33 ▼34.96 |
Random Text /wp-admin/options-general.php?page=randomtext | 1.82 | 5.06 |
Server storage [IO: ▲0.13MB] [DB: ▲0.00MB] Passed 3 tests
Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 6 new files
Database: 1 new table, 1 new option
New tables |
---|
wp_randomtext |
New WordPress options |
---|
widget_randomtext |
Browser metrics Passed 4 tests
This is an overview of browser requirements for Random Text
Minimal impact on browser resources
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 3,708 ▲126 | 15.72 ▲0.13 | 8.52 ▼3.02 | 48.33 ▲4.21 |
Dashboard /wp-admin | 2,969 ▲35 | 5.91 ▼0.15 | 150.94 ▼6.40 | 111.00 ▼5.15 |
Posts /wp-admin/edit.php | 2,744 ▲5 | 2.72 ▼0.00 | 99.09 ▲34.29 | 100.92 ▲13.43 |
Add New Post /wp-admin/post-new.php | 1,686 ▲3 | 18.80 ▲0.11 | 425.92 ▼32.13 | 116.17 ▲6.96 |
Media Library /wp-admin/upload.php | 1,815 ▲8 | 5.02 ▼0.02 | 152.33 ▼1.39 | 111.14 ▼13.28 |
Random Text /wp-admin/options-general.php?page=randomtext | 1,170 | 2.09 | 55.82 | 72.53 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 50% from 4 tests
🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
- Uninstall procedure validation failed for this plugin
- > Deprecated in wp-content/plugins/randomtext/randomtext.php+30
Methods with the same name as their class will not be constructors in a future version of PHP; randomtext has a deprecated constructor
- Zombie WordPress options were found after uninstall: 1 option
- widget_randomtext
Smoke tests 50% from 4 tests
Server-side errors 0% from 1 test
🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
These server-side errors were triggered
- > GET request to /wp-admin/options-general.php?page=randomtext
- > Deprecated in wp-content/plugins/randomtext/randomtext.php+30
Methods with the same name as their class will not be constructors in a future version of PHP; randomtext has a deprecated constructor
- > GET request to /wp-admin/options-general.php?page=randomtext
- > User deprecated in wp-includes/functions.php+5304
The called constructor method for WP_Widget in randomtext is deprecated since version 4.3.0! Use __construct() instead.
- > GET request to /wp-admin/options-general.php?page=randomtext
- > Notice in wp-content/plugins/randomtext/randomtext.php+149
Undefined variable: result
SRP 50% from 2 tests
🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please fix the following items
- 2× GET requests to PHP files have triggered server-side errors or warnings:
- > PHP Fatal error
Uncaught Error: Call to undefined function admin_url() in wp-content/plugins/randomtext/randomtext_admin.php:3
- > PHP Fatal error
Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/randomtext/randomtext.php:30
- > 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 is important because it is parsed by WordPress.org for the public listing of your plugin
Please fix the following attributes:
- Screenshots: These screenshots have no corresponding images in /assets: #1 (Sidebar widget options), #2 (Text management page)
randomtext/randomtext.php Passed 13 tests
This is the main PHP file of "Random Text" version 0.3.0, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
48 characters long description:
A widget to display randomized text on your site
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 detected369 lines of code in 3 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 3 | 75 | 38 | 369 |
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.26 |
Average class complexity | 10.00 |
▷ Minimum class complexity | 10.00 |
▷ Maximum class complexity | 10.00 |
Average method complexity | 2.80 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 5.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 | 5 | |
▷ Static methods | 0 | 0.00% |
▷ Public methods | 5 | 100.00% |
▷ Protected methods | 0 | 0.00% |
▷ Private methods | 0 | 0.00% |
Functions | 14 | |
▷ Named functions | 14 | 100.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.11MB with 0.06MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
screenshot-1.png | 19.36KB | 10.21KB | ▼ 47.27% |
screenshot-2.png | 96.54KB | 31.85KB | ▼ 67.01% |