Benchmarks
Plugin footprint 58% from 16 tests
Installer 0% from 1 test
🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
It is recommended to fix the following installer errors
- The plugin cannot be installed
- > Deprecated in wp-content/plugins/rt-prettyphoto/rt-prettyphoto.php+135
Unparenthesized `a ? b : c ? d : e` is deprecated. Use either `(a ? b : c) ? d : e` or `a ? b : (c ? d : e)`
Server metrics [RAM: ▼2.42MB] [CPU: ▼347.74ms] Passed 4 tests
Server-side resources used by Royal PrettyPhoto
Normal server usage
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 1.95 ▼1.56 | 4.24 ▼47.75 |
Dashboard /wp-admin | 1.97 ▼1.44 | 4.02 ▼28.78 |
Posts /wp-admin/edit.php | 1.97 ▼1.67 | 4.23 ▼33.75 |
Add New Post /wp-admin/post-new.php | 1.97 ▼5.00 | 4.20 ▼1,280.68 |
Media Library /wp-admin/upload.php | 1.97 ▼1.33 | 3.55 ▼18.91 |
Royal PrettyPhoto /wp-admin/options-general.php?page=royal_pretty_photo | 1.97 | 4.14 |
Server storage [IO: ▲0.09MB] [DB: ▲0.00MB] Passed 3 tests
Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 12 new files
Database: no new tables, no new options
Browser metrics Passed 4 tests
A check of browser resources used by Royal PrettyPhoto
This plugin has a minimal impact on browser resources
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 3,917 ▲175 | 16.26 ▲0.72 | 9.61 ▲3.43 | 2.38 ▲0.22 |
Dashboard /wp-admin | 2,899 ▲38 | 6.21 ▲0.06 | 116.21 ▼14.36 | 156.85 ▼4.58 |
Posts /wp-admin/edit.php | 2,699 ▲8 | 3.25 ▲0.01 | 61.64 ▼3.87 | 133.60 ▼6.88 |
Add New Post /wp-admin/post-new.php | 1,670 ▲9 | 16.55 ▲0.40 | 413.40 ▲21.25 | 159.60 ▲8.21 |
Media Library /wp-admin/upload.php | 1,709 ▲8 | 5.54 ▲0.02 | 133.12 ▼1.19 | 184.70 ▲0.61 |
Royal PrettyPhoto /wp-admin/options-general.php?page=royal_pretty_photo | 1,306 | 2.76 | 61.85 | 111.77 |
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
The following items require your attention
- This plugin did not uninstall without warnings or errors
- > Deprecated in wp-content/plugins/rt-prettyphoto/rt-prettyphoto.php+135
Unparenthesized `a ? b : c ? d : e` is deprecated. Use either `(a ? b : c) ? d : e` or `a ? b : (c ? d : e)`
Smoke tests 50% from 4 tests
Server-side errors 0% from 1 test
🔹 Test weight: 20 | A smoke test targeting server-side errors
Smoke test failed, please fix the following
- > GET request to /wp-admin/options-general.php?page=royal_pretty_photo
- > Deprecated in wp-content/plugins/rt-prettyphoto/rt-prettyphoto.php+135
Unparenthesized `a ? b : c ? d : e` is deprecated. Use either `(a ? b : c) ? d : e` or `a ? b : (c ? d : e)`
- > GET request to /wp-admin/options-general.php?page=royal_pretty_photo
- > User notice in wp-includes/functions.php+5768
wp_enqueue_script was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the rt-wpp-plugin-active handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
- > GET request to /wp-admin/options-general.php?page=royal_pretty_photo
- > User notice in wp-includes/functions.php+5768
wp_enqueue_script was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the rt-wpp-plugin-script-active handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
- > GET request to /wp-admin/options-general.php?page=royal_pretty_photo
- > User notice in wp-includes/functions.php+5768
wp_enqueue_style was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the rt-wpp-plugin-style handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
- > GET request to /wp-admin/options-general.php?page=royal_pretty_photo
- > User deprecated in wp-includes/functions.php+5326
screen_icon is deprecated since version 3.8.0 with no alternative available.
- > GET request to /wp-admin/options-general.php?page=royal_pretty_photo
- > User deprecated in wp-includes/functions.php+5326
get_screen_icon is deprecated since version 3.8.0 with no alternative available.
- 8 occurences, only the last one shown
- > GET request to /wp-admin/options-general.php?page=royal_pretty_photo
- > Notice in wp-content/plugins/rt-prettyphoto/rt-prettyphoto.php+218
Trying to access array offset on value of type bool
SRP 50% from 2 tests
🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
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_filter() in wp-content/plugins/rt-prettyphoto/rt-prettyphoto.php:13
- > PHP Fatal error
User-side errors Passed 1 test
🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser issues were found
Optimizations
Plugin configuration 97% from 29 tests
readme.txt 94% from 16 tests
Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
These attributes need your attention:
- Plugin Name: "Plugin Name" should be replaced with the name of your plugin on the first line (
=== rt-prettyphoto ===
)
rt-prettyphoto/rt-prettyphoto.php Passed 13 tests
The main PHP script in "Royal PrettyPhoto" version 1.3 is automatically included on every request by WordPress
83 characters long description:
This plugin will automatic add lightbox in wordpress post/page without disturbance.
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
There were no executable files found in this plugin1,069 lines of code in 4 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
JavaScript | 2 | 183 | 95 | 636 |
PHP | 1 | 135 | 49 | 263 |
CSS | 1 | 0 | 0 | 170 |
PHP code Passed 2 tests
An overview 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.12 |
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 | 12 | |
▷ Named functions | 12 | 100.00% |
▷ Anonymous functions | 0 | 0.00% |
Constants | 1 | |
▷ Global constants | 1 | 100.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
6 PNG files occupy 0.01MB with 0.01MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
images/prettyPhoto/default/default_thumb.png | 1.50KB | 0.61KB | ▼ 59.47% |
images/prettyPhoto/default/sprite_y.png | 1.13KB | 0.13KB | ▼ 88.81% |
images/prettyPhoto/default/sprite_prev.png | 1.34KB | 0.38KB | ▼ 71.73% |
images/prettyPhoto/default/sprite.png | 6.53KB | 3.21KB | ▼ 50.87% |
images/prettyPhoto/default/sprite_next.png | 1.33KB | 0.39KB | ▼ 70.69% |