Benchmarks
Plugin footprint 65% from 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Install script ran successfully
Server metrics [RAM: ▼0.71MB] [CPU: ▼21.72ms] Passed 4 tests
Server-side resources used by Gallery for Posts
This plugin does not affect your website's performance
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.54 ▲0.08 | 37.91 ▼0.88 |
Dashboard /wp-admin | 3.20 ▼0.11 | 33.37 ▼13.99 |
Posts /wp-admin/edit.php | 3.28 ▼0.08 | 36.13 ▼9.99 |
Add New Post /wp-admin/post-new.php | 3.24 ▼2.65 | 38.70 ▼62.00 |
Media Library /wp-admin/upload.php | 3.22 ▼0.01 | 36.00 ▲0.16 |
Post Types /wp-admin/admin.php?page=sn-gfp-post-types | 3.28 | 35.74 |
Templates /wp-admin/admin.php?page=sn-gfp-templates | 3.28 | 35.73 |
Server storage [IO: ▲0.19MB] [DB: ▲0.00MB] Passed 3 tests
Analyzing filesystem and database footprints of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 20 new files
Database: no new tables, 6 new options
New WordPress options |
---|
widget_recent-posts |
db_upgraded |
can_compress_scripts |
widget_recent-comments |
theysaidso_admin_options |
widget_theysaidso_widget |
Browser metrics Passed 4 tests
Checking browser requirements for Gallery for Posts
This plugin renders optimally with no browser resource issues detected
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,835 ▲74 | 14.35 ▲0.00 | 1.84 ▲0.22 | 45.33 ▲8.56 |
Dashboard /wp-admin | 2,235 ▲58 | 5.66 ▲0.02 | 84.18 ▼2.27 | 81.58 ▲37.66 |
Posts /wp-admin/edit.php | 2,149 ▲49 | 2.22 ▲0.19 | 37.60 ▲0.50 | 35.17 ▲0.90 |
Add New Post /wp-admin/post-new.php | 1,556 ▲30 | 22.77 ▼0.43 | 747.18 ▲83.15 | 55.39 ▲4.08 |
Media Library /wp-admin/upload.php | 1,443 ▲46 | 4.25 ▲0.09 | 111.48 ▲10.91 | 69.42 ▲19.38 |
Post Types /wp-admin/admin.php?page=sn-gfp-post-types | 1,004 | 2.29 | 31.71 | 48.07 |
Templates /wp-admin/admin.php?page=sn-gfp-templates | 947 | 2.17 | 33.63 | 30.96 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 50% from 4 tests
🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
Please fix the following items
- This plugin cannot be uninstalled
- > Deprecated in wp-includes/class-wp-hook.php+310
Non-static method SN_GFP_INIT::uninstall_plugin_data() should not be called statically
- The uninstall procedure has failed, leaving 6 options in the database
- widget_recent-comments
- widget_theysaidso_widget
- theysaidso_admin_options
- can_compress_scripts
- widget_recent-posts
- db_upgraded
Smoke tests 50% from 4 tests
Server-side errors 0% from 1 test
🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Almost there, just fix the following server-side errors
- 2 occurences, only the last one shown
- > GET request to /wp-admin/admin.php?page=sn-gfp-templates
- > Notice in wp-content/plugins/gallery-for-posts-basic/includes/class.sn-gfp-init.php+127
Undefined index: sn_gfp_message
- 2 occurences, only the last one shown
- > GET request to /wp-admin/admin.php?page=sn-gfp-templates
- > Notice in wp-content/plugins/gallery-for-posts-basic/includes/class.sn-gfp-init.php+127
Trying to access array offset on value of type null
- 14 occurences, only the last one shown
- > GET request to /wp-admin/admin.php?page=sn-gfp-post-types
- > Warning in wp-content/plugins/gallery-for-posts-basic/templates/post-types.php+22
in_array() expects parameter 2 to be array, bool given
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× GET requests to PHP files have triggered server-side errors or warnings:
- > PHP Fatal error
Uncaught Error: Class 'SN_GFP_INIT' not found in wp-content/plugins/gallery-for-posts-basic/templates/navigation.php:1
- > PHP Fatal error
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 96% from 29 tests
readme.txt Passed 16 tests
Often overlooked, readme.txt is one of the most important files in your plugin
3 plugin tags: wordpress, custom post, gallery
gallery-for-posts-basic/init.php 92% from 13 tests
The principal PHP file in "Gallery for Posts" v. 1.1 is loaded by WordPress automatically on each request
Please take the time to fix the following:
- Main file name: Please rename the main PHP file in this plugin to the plugin slug ("gallery-for-posts-basic.php" instead of "init.php")
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
Success! There were no dangerous files found in this plugin1,588 lines of code in 16 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
JavaScript | 5 | 135 | 245 | 959 |
PHP | 9 | 87 | 168 | 347 |
CSS | 2 | 13 | 16 | 282 |
PHP code Passed 2 tests
A short review of cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.39 |
Average class complexity | 4.00 |
▷ Minimum class complexity | 2.00 |
▷ Maximum class complexity | 7.00 |
Average method complexity | 1.56 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 4.00 |
Code structure | ||
---|---|---|
Namespaces | 0 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 5 | |
▷ Abstract classes | 0 | 0.00% |
▷ Concrete classes | 5 | 100.00% |
▷ Final classes | 0 | 0.00% |
Methods | 27 | |
▷ Static methods | 4 | 14.81% |
▷ Public methods | 26 | 96.30% |
▷ Protected methods | 0 | 0.00% |
▷ Private methods | 1 | 3.70% |
Functions | 2 | |
▷ Named functions | 2 | 100.00% |
▷ Anonymous functions | 0 | 0.00% |
Constants | 11 | |
▷ Global constants | 11 | 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
1 PNG file occupies 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
assets/images/icon.png | 0.94KB | 0.11KB | ▼ 88.20% |