Benchmarks
Plugin footprint Passed 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | The install procedure must perform silently
Installer ran successfully
Server metrics [RAM: ▼0.02MB] [CPU: ▼292.56ms] Passed 4 tests
A check of server-side resources used by A Random Number
This plugin does not affect your website's performance
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.52 ▲0.01 | 51.12 ▼0.50 |
Dashboard /wp-admin | 3.41 ▲0.00 | 33.33 ▲0.05 |
Posts /wp-admin/edit.php | 3.65 ▲0.01 | 35.58 ▼1.79 |
Add New Post /wp-admin/post-new.php | 6.88 ▼0.09 | 92.76 ▼1,167.98 |
Media Library /wp-admin/upload.php | 3.29 ▲0.00 | 26.48 ▲0.44 |
Server storage [IO: ▲0.01MB] [DB: ▲0.00MB] Passed 3 tests
Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 3 new files
Database: no new tables, no new options
Browser metrics Passed 4 tests
A check of browser resources used by A Random Number
This plugin has a minimal impact on browser resources
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 3,802 ▲48 | 15.85 ▼0.09 | 6.26 ▼0.55 | 2.83 ▼0.06 |
Dashboard /wp-admin | 2,895 ▲34 | 6.13 ▼0.03 | 119.25 ▼18.46 | 160.59 ▼1.39 |
Posts /wp-admin/edit.php | 2,691 ▼3 | 3.24 ▲0.00 | 63.53 ▲0.67 | 136.48 ▼8.85 |
Add New Post /wp-admin/post-new.php | 1,720 ▼53 | 21.69 ▼0.44 | 439.43 ▼9.71 | 154.21 ▼3.69 |
Media Library /wp-admin/upload.php | 1,698 ▼0 | 5.46 ▼0.04 | 139.20 ▼10.85 | 189.94 ▲2.31 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests
🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
This plugin's uninstaller ran successfully
Smoke tests 75% 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 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
- 1× PHP files trigger errors when accessed directly with GET requests:
- > PHP Fatal error
Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/a-random-number/a-random-number.php:31
- > 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)
Everything seems fine, but this is not an exhaustive test
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 need to be fixed:
- Plugin Name: Please specify the plugin name on the first line (
=== a-random-number ===
)
a-random-number/a-random-number.php Passed 13 tests
"A Random Number" version 1.1's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
51 characters long description:
Outputs a random number via shortcode. It's magic.
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
There were no executable files found in this plugin84 lines of code in 2 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 1 | 11 | 16 | 49 |
JavaScript | 1 | 0 | 0 | 35 |
PHP code Passed 2 tests
A brief analysis of cyclomatic complexity and code structure for this plugin
All good! No complexity issues found
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.35 |
Average class complexity | 0.00 |
▷ Minimum class complexity | 0.00 |
▷ Maximum class complexity | 0.00 |
Average method complexity | 0.00 |
▷ Minimum method complexity | 0.00 |
▷ Maximum method complexity | 0.00 |
Code structure | ||
---|---|---|
Namespaces | 0 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 0 | |
▷ Abstract classes | 0 | 0.00% |
▷ Concrete classes | 0 | 0.00% |
▷ Final classes | 0 | 0.00% |
Methods | 0 | |
▷ Static methods | 0 | 0.00% |
▷ Public methods | 0 | 0.00% |
▷ Protected methods | 0 | 0.00% |
▷ Private methods | 0 | 0.00% |
Functions | 5 | |
▷ Named functions | 5 | 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
Often times overlooked, PNG files can occupy unnecessary space in your plugin
There were not PNG files found in your plugin