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.07MB] [CPU: ▼259.22ms] Passed 4 tests
Server-side resources used by S gallery
Server-side resource usage in normal parameters
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 2.89 ▲0.17 | 34.75 ▲14.22 |
Dashboard /wp-admin | 3.13 ▲0.07 | 45.08 ▲8.90 |
Posts /wp-admin/edit.php | 3.18 ▲0.07 | 39.97 ▼6.85 |
Add New Post /wp-admin/post-new.php | 5.49 ▲0.06 | 94.48 ▼1,033.90 |
Media Library /wp-admin/upload.php | 3.07 ▲0.06 | 33.69 ▼5.04 |
Gallery settings /wp-admin/edit.php?post_type=simple_gallery&page=my-custom-submenu-page | 3.01 | 27.74 |
Add New Image /wp-admin/post-new.php?post_type=simple_gallery | 3.19 | 47.19 |
Simple Gallery /wp-admin/edit.php?post_type=simple_gallery | 3.11 | 35.24 |
Server storage [IO: ▲0.02MB] [DB: ▲0.00MB] Passed 3 tests
How much does this plugin use your filesystem and database?
The plugin installed successfully
Filesystem: 11 new files
Database: no new tables, no new options
Browser metrics Passed 4 tests
Checking browser requirements for S gallery
Minimal impact on browser resources
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 3,838 ▲233 | 16.64 ▲1.14 | 12.95 ▲4.93 | 45.45 ▼3.19 |
Dashboard /wp-admin | 3,004 ▲151 | 6.02 ▲0.20 | 143.06 ▲10.61 | 99.98 ▼8.11 |
Posts /wp-admin/edit.php | 2,748 ▲45 | 2.70 ▲0.01 | 63.83 ▼8.55 | 88.19 ▼3.09 |
Add New Post /wp-admin/post-new.php | 2,064 ▲28 | 19.01 ▲0.01 | 360.40 ▲5.32 | 105.77 ▼6.37 |
Media Library /wp-admin/upload.php | 1,814 ▲42 | 5.03 ▲0.01 | 146.17 ▼11.58 | 113.52 ▼12.44 |
Gallery settings /wp-admin/edit.php?post_type=simple_gallery&page=my-custom-submenu-page | 1,150 | 2.09 | 55.96 | 83.96 |
Add New Image /wp-admin/post-new.php?post_type=simple_gallery | 3,147 | 9.06 | 206.13 | 126.27 |
Simple Gallery /wp-admin/edit.php?post_type=simple_gallery | 1,431 | 2.61 | 62.05 | 60.68 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests
🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
Uninstall script ran successfully
Smoke tests 50% from 4 tests
Server-side errors 0% from 1 test
🔹 Test weight: 20 | This is a shallow check for server-side errors
These server-side errors were triggered
- > GET request to /wp-admin/edit.php?post_type=simple_gallery&page=my-custom-submenu-page
- > User deprecated in wp-includes/functions.php+5221
screen_icon is deprecated since version 3.8.0 with no alternative available.
- > GET request to /wp-admin/edit.php?post_type=simple_gallery&page=my-custom-submenu-page
- > User deprecated in wp-includes/functions.php+5221
get_screen_icon is deprecated since version 3.8.0 with no alternative available.
- 7 occurences, only the last one shown
- > GET request to /wp-admin/edit.php?post_type=simple_gallery&page=my-custom-submenu-page
- > Notice in wp-content/plugins/s-gallery/r-options.php+76
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
The following issues need your attention
- 3× PHP files trigger server-side errors or warnings when accessed directly:
- > PHP Fatal error
Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/s-gallery/r-options.php:2
- > PHP Fatal error
Uncaught Error: Call to undefined function add_action() in wp-content/plugins/s-gallery/index.php:15
- > PHP Fatal error
Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/s-gallery/shortcode.php:67
- > 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 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
These attributes need your attention:
- Tags: There are too many tags (15 tag instead of maximum 10)
s-gallery/index.php 92% from 13 tests
The primary PHP file in "S gallery" version 1.1.1 is used by WordPress to initiate all plugin functionality
Please make the necessary changes and fix the following:
- Main file name: Please rename the main PHP file in this plugin to the plugin slug ("s-gallery.php" instead of "index.php")
Code Analysis Passed 3 tests
File types Passed 1 test
🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Good job! No executable or dangerous file extensions detected514 lines of code in 7 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 4 | 82 | 62 | 303 |
CSS | 2 | 6 | 0 | 156 |
JavaScript | 1 | 18 | 10 | 55 |
PHP code Passed 2 tests
This is a short overview of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity issues
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.38 |
Average class complexity | 31.00 |
▷ Minimum class complexity | 31.00 |
▷ Maximum class complexity | 31.00 |
Average method complexity | 7.00 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 27.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 | 1 | 20.00% |
▷ Public methods | 3 | 60.00% |
▷ Protected methods | 0 | 0.00% |
▷ Private methods | 2 | 40.00% |
Functions | 10 | |
▷ Named functions | 10 | 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 1 test
Image compression Passed 1 test
Often times overlooked, PNG files can occupy unnecessary space in your plugin
3 compressed PNG files occupy 0.00MB
Potential savings
Compression of 3 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
css/close.png | 0.24KB | 0.25KB | 0.00% |
css/arrow-right.png | 0.21KB | 0.32KB | 0.00% |
css/arrow-left.png | 0.23KB | 0.32KB | 0.00% |