Benchmarks
Plugin footprint 65% from 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed successfully, without throwing any errors or notices
Server metrics [RAM: ▲0.02MB] [CPU: ▼147.25ms] Passed 4 tests
Analyzing server-side resources used by NR Image Gallery
Normal server usage
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 2.79 ▼0.04 | 25.35 ▼5.87 |
Dashboard /wp-admin | 3.11 ▲0.05 | 46.40 ▲1.39 |
Posts /wp-admin/edit.php | 3.16 ▲0.04 | 44.71 ▼12.42 |
Add New Post /wp-admin/post-new.php | 5.46 ▲0.03 | 94.04 ▼572.11 |
Media Library /wp-admin/upload.php | 3.05 ▲0.05 | 36.16 ▲4.67 |
Edit Gallery /wp-admin/admin.php?page=edit-gallery | 3.07 | 31.89 |
Add Images /wp-admin/admin.php?page=add-images | 3.07 | 30.93 |
Add Gallery /wp-admin/admin.php?page=add-gallery | 3.04 | 29.65 |
NR Image Gallery /wp-admin/admin.php?page=nri-admin | 3.03 | 28.45 |
Custom CSS /wp-admin/admin.php?page=custom-css | 3.02 | 28.45 |
Server storage [IO: ▲0.12MB] [DB: ▲0.00MB] Passed 3 tests
Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 18 new files
Database: 2 new tables, 2 new options
New tables |
---|
wp_nr_image_gallery |
wp_nr_image_gallery_images |
New WordPress options |
---|
wp_nr_image_gallery_defaults |
nr_image_gallery_db_version |
Browser metrics Passed 4 tests
NR Image Gallery: an overview of browser usage
There were no issues detected in relation to browser resource usage
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 3,868 ▲231 | 16.66 ▲1.38 | 15.72 ▲1.64 | 46.66 ▲0.93 |
Dashboard /wp-admin | 3,021 ▲84 | 5.88 ▼0.05 | 150.90 ▲0.82 | 119.89 ▲12.53 |
Posts /wp-admin/edit.php | 2,790 ▲51 | 2.84 ▲0.12 | 68.73 ▲3.45 | 91.78 ▲4.93 |
Add New Post /wp-admin/post-new.php | 1,905 ▲222 | 19.23 ▲0.79 | 401.50 ▼9.45 | 103.94 ▼2.95 |
Media Library /wp-admin/upload.php | 1,858 ▲48 | 5.04 ▲0.01 | 153.05 ▲3.01 | 119.55 ▲7.64 |
Edit Gallery /wp-admin/admin.php?page=edit-gallery | 1,090 | 2.58 | 67.05 | 71.90 |
Add Images /wp-admin/admin.php?page=add-images | 1,109 | 2.60 | 65.69 | 71.21 |
Add Gallery /wp-admin/admin.php?page=add-gallery | 1,400 | 2.61 | 59.68 | 71.64 |
NR Image Gallery /wp-admin/admin.php?page=nri-admin | 1,129 | 2.09 | 56.64 | 63.61 |
Custom CSS /wp-admin/admin.php?page=custom-css | 1,075 | 2.08 | 54.63 | 65.50 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 50% from 4 tests
🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
- This plugin does not fully uninstall, leaving 2 tables in the database
- wp_nr_image_gallery
- wp_nr_image_gallery_images
- This plugin does not fully uninstall, leaving 2 options in the database
- wp_nr_image_gallery_defaults
- nr_image_gallery_db_version
Smoke tests 25% from 4 tests
Server-side errors 0% from 1 test
🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
These server-side errors were triggered
- > GET request to /wp-admin/admin.php?page=add-images
- > Warning in wp-content/plugins/nr-image-gallery/admin/add-images.php+144
count(): Parameter must be an array or an object that implements Countable
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
- 5× PHP files output non-empty strings when accessed directly via GET requests:
- > /wp-content/plugins/nr-image-gallery/admin/add-gallery.php
- > /wp-content/plugins/nr-image-gallery/admin/overview.php
- > /wp-content/plugins/nr-image-gallery/admin/custom-css.php
- > /wp-content/plugins/nr-image-gallery/admin/edit-gallery.php
- > /wp-content/plugins/nr-image-gallery/admin/add-images.php
- 4× PHP files trigger server errors when accessed directly:
- > PHP Notice
Trying to get property 'prefix' of non-object in wp-content/plugins/nr-image-gallery/nr-image-gallery.php on line 20
- > PHP Notice
Trying to get property 'prefix' of non-object in wp-content/plugins/nr-image-gallery/nr-image-gallery.php on line 21
- > PHP Fatal error
Uncaught Error: Call to undefined function add_action() in wp-content/plugins/nr-image-gallery/includes/mr-image-resize.php:23
- > PHP Fatal error
Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/nr-image-gallery/nr-image-gallery.php:24
- > PHP Notice
User-side errors Passed 1 test
🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
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
These attributes need to be fixed:
- Screenshots: These screenshots do not have images: #1 (NR Image Gallery add gallery page), #2 (NR Image Gallery add image page)
nr-image-gallery/nr-image-gallery.php Passed 13 tests
The main file in "NR Image Gallery" v. 1.0 serves as a complement to information provided in readme.txt and as the entry point to the plugin
31 characters long description:
Simple responsive image gallery
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
No dangerous file extensions were detected1,067 lines of code in 14 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 7 | 172 | 122 | 934 |
JavaScript | 4 | 22 | 43 | 76 |
CSS | 3 | 7 | 1 | 57 |
PHP code Passed 2 tests
A brief analysis 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 | 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 | 18 | |
▷ Named functions | 18 | 100.00% |
▷ Anonymous functions | 0 | 0.00% |
Constants | 3 | |
▷ Global constants | 3 | 100.00% |
▷ Class constants | 0 | 0.00% |
▷ Public constants | 0 | 0.00% |
Plugin size Passed 2 tests
Image compression Passed 2 tests
It is recommended to compress PNG files in your plugin to minimize bandwidth usage
2 PNG files occupy 0.06MB with 0.04MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
screenshot-1.png | 24.57KB | 8.29KB | ▼ 66.25% |
screenshot-2.png | 35.23KB | 11.98KB | ▼ 65.99% |