Benchmarks
Plugin footprint 83% from 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
This plugin's installer ran successfully
Server metrics [RAM: ▲0.02MB] [CPU: ▼154.86ms] Passed 4 tests
An overview of server-side resources used by Sunrise
No issues were detected with server-side resource usage
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 2.86 ▲0.02 | 25.24 ▲1.96 |
Dashboard /wp-admin | 3.08 ▲0.02 | 34.86 ▼3.71 |
Posts /wp-admin/edit.php | 3.14 ▲0.03 | 31.59 ▼15.47 |
Add New Post /wp-admin/post-new.php | 5.45 ▲0.01 | 68.79 ▼595.87 |
Media Library /wp-admin/upload.php | 3.03 ▲0.02 | 22.92 ▼4.37 |
Plugin name /wp-admin/options-general.php?page=pluginname | 2.76 | 14.67 |
Server storage [IO: ▲0.16MB] [DB: ▲0.00MB] Passed 3 tests
How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 34 new files
Database: no new tables, 1 new option
New WordPress options |
---|
pluginname_options |
Browser metrics Passed 4 tests
Sunrise: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 3,671 ▲70 | 15.97 ▲0.33 | 4.89 ▼2.70 | 76.77 ▼0.07 |
Dashboard /wp-admin | 2,935 ▲42 | 6.04 ▼0.14 | 113.34 ▼20.50 | 167.78 ▼6.90 |
Posts /wp-admin/edit.php | 2,742 ▼1 | 3.24 ▲0.00 | 62.28 ▼3.11 | 134.62 ▼3.14 |
Add New Post /wp-admin/post-new.php | 3,746 ▲48 | 19.20 ▲1.55 | 429.23 ▲1.98 | 158.74 ▼21.73 |
Media Library /wp-admin/upload.php | 1,757 ▲5 | 5.53 ▲0.06 | 149.52 ▼3.35 | 180.90 ▼4.21 |
Plugin name /wp-admin/options-general.php?page=pluginname | 1,631 | 3.00 | 61.85 | 116.65 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 75% from 4 tests
🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
You still need to fix the following
- Zombie WordPress options were found after uninstall: 1 option
- pluginname_options
Smoke tests 25% from 4 tests
Server-side errors 0% from 1 test
🔹 Test weight: 20 | This is a shallow check for server-side errors
These errors were triggered by the plugin
- 2 occurences, only the last one shown
- > GET request to /wp-admin/options-general.php?page=pluginname
- > Notice in wp-content/plugins/sunrise/classes/sunrise.class.php+206
Undefined index: action
- 4 occurences, only the last one shown
- > GET request to /wp-admin/options-general.php?page=pluginname
- > Notice in wp-content/plugins/sunrise/inc/views/notifications.php+33
Undefined index: message
- 10 occurences, only the last one shown
- > GET request to /wp-admin/options-general.php?page=pluginname
- > Notice in wp-content/plugins/sunrise/inc/views/code.php+1
Undefined index: triggable
- 2 occurences, only the last one shown
- > GET request to /wp-admin/options-general.php?page=pluginname
- > Notice in wp-content/plugins/sunrise/inc/views/select.php+2
Undefined index: trigger
- 2 occurences, only the last one shown
- > GET request to /wp-admin/options-general.php?page=pluginname
- > Notice in wp-content/plugins/sunrise/inc/views/closetab.php+2
Undefined index: actions
SRP 0% from 2 tests
🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please fix the following items
- 13× PHP files output text when accessed directly (only 10 are shown):
- > /wp-content/plugins/sunrise/inc/views/textarea.php
- > /wp-content/plugins/sunrise/inc/views/checkbox.php
- > /wp-content/plugins/sunrise/inc/views/title.php
- > /wp-content/plugins/sunrise/inc/views/radio.php
- > /wp-content/plugins/sunrise/inc/views/select.php
- > /wp-content/plugins/sunrise/inc/views/text.php
- > /wp-content/plugins/sunrise/inc/views/html.php
- > /wp-content/plugins/sunrise/inc/views/size.php
- > /wp-content/plugins/sunrise/inc/views/hidden.php
- > /wp-content/plugins/sunrise/inc/views/color.php
- 203× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
- > PHP Notice
Trying to access array offset on value of type null in wp-content/plugins/sunrise/inc/views/size.php on line 4
- > PHP Notice
Undefined variable: option in wp-content/plugins/sunrise/inc/views/hidden.php on line 1
- > PHP Notice
Trying to access array offset on value of type null in wp-content/plugins/sunrise/inc/views/upload.php on line 3
- > PHP Notice
Trying to access array offset on value of type null in wp-content/plugins/sunrise/inc/views/select.php on line 10
- > PHP Notice
Undefined variable: option in wp-content/plugins/sunrise/inc/views/size.php on line 4
- > PHP Notice
Undefined variable: settings in wp-content/plugins/sunrise/inc/views/hidden.php on line 1
- > PHP Fatal error
Uncaught Error: Call to undefined function do_action() in wp-content/plugins/sunrise/inc/views/settings.php:1
- > PHP Notice
Trying to access array offset on value of type null in wp-content/plugins/sunrise/inc/views/hidden.php on line 1
- > PHP Notice
Trying to access array offset on value of type null in wp-content/plugins/sunrise/inc/views/upload.php on line 7
- > PHP Notice
Undefined variable: option in wp-content/plugins/sunrise/inc/views/textarea.php on line 5
- > PHP Notice
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 uses markdown syntax to describe your plugin to the world
Attributes that need to be fixed:
- Screenshots: These screenshots require images: #1 (Standard control panel fields), #2 (Additional fields), #3 (Installed plugin), #4 (Example of options definition)
- Tags: Please reduce the number of tags, currently 13 tag instead of maximum 10
sunrise/plugin-example.php 85% from 13 tests
"Sunrise" version 2.0.0's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
Please take the time to fix the following:
- Main file name: The principal plugin file should be the same as the plugin slug ("sunrise.php" instead of "plugin-example.php")
- Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug
Code Analysis Passed 3 tests
File types Passed 1 test
🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Good job! No executable or dangerous file extensions detected1,323 lines of code in 27 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
JavaScript | 2 | 135 | 223 | 668 |
PHP | 22 | 43 | 152 | 522 |
CSS | 1 | 30 | 21 | 103 |
PO File | 1 | 1 | 0 | 16 |
Markdown | 1 | 5 | 0 | 14 |
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.24 |
Average class complexity | 30.00 |
▷ Minimum class complexity | 30.00 |
▷ Maximum class complexity | 30.00 |
Average method complexity | 2.71 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 9.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 | 17 | |
▷ Static methods | 0 | 0.00% |
▷ Public methods | 17 | 100.00% |
▷ Protected methods | 0 | 0.00% |
▷ Private methods | 0 | 0.00% |
Functions | 1 | |
▷ Named functions | 1 | 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
PNG files should be compressed to save space and minimize bandwidth usage
6 PNG files occupy 0.10MB with 0.04MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
assets/images/code.png | 0.94KB | 0.10KB | ▼ 89.75% |
screenshot-1.png | 28.85KB | 14.34KB | ▼ 50.28% |
assets/images/success.png | 0.62KB | 0.62KB | 0.00% |
screenshot-3.png | 6.03KB | 3.99KB | ▼ 33.78% |
screenshot-2.png | 34.46KB | 17.64KB | ▼ 48.82% |