Benchmarks
Plugin footprint 65% from 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Installer ran successfully
Server metrics [RAM: ▼1.90MB] [CPU: ▼57.21ms] Passed 4 tests
Analyzing server-side resources used by Daneshjooyar Post Gallery
This plugin has minimal impact on server resources
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 2.09 ▼1.37 | 4.71 ▼39.29 |
Dashboard /wp-admin | 2.12 ▼1.23 | 6.67 ▼55.62 |
Posts /wp-admin/edit.php | 2.12 ▼1.24 | 7.02 ▼39.54 |
Add New Post /wp-admin/post-new.php | 2.12 ▼3.77 | 6.13 ▼94.37 |
Media Library /wp-admin/upload.php | 2.12 ▼1.11 | 5.51 ▼25.22 |
Server storage [IO: ▲0.22MB] [DB: ▲0.00MB] Passed 3 tests
How much does this plugin use your filesystem and database?
This plugin installed successfully
Filesystem: 64 new files
Database: no new tables, 6 new options
New WordPress options |
---|
theysaidso_admin_options |
widget_recent-comments |
can_compress_scripts |
db_upgraded |
widget_recent-posts |
widget_theysaidso_widget |
Browser metrics Passed 4 tests
An overview of browser requirements for Daneshjooyar Post Gallery
Minimal impact on browser resources
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,790 ▲43 | 14.37 ▲0.03 | 1.46 ▼0.16 | 35.39 ▼8.47 |
Dashboard /wp-admin | 2,192 ▲17 | 5.60 ▼0.11 | 94.42 ▼18.85 | 44.31 ▼2.50 |
Posts /wp-admin/edit.php | 2,103 ▲3 | 1.95 ▼0.06 | 39.54 ▼4.56 | 36.73 ▼0.63 |
Add New Post /wp-admin/post-new.php | 6,226 ▲4,700 | 26.23 ▲2.64 | 795.31 ▲140.97 | 54.03 ▲9.16 |
Media Library /wp-admin/upload.php | 1,403 ▲3 | 4.22 ▲0.02 | 96.82 ▼1.07 | 43.70 ▼0.23 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 50% from 4 tests
🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
It is recommended to fix the following
- This plugin cannot be uninstalled
- > Warning in wp-content/plugins/daneshjooyar-post-gallery/Core/DYPG_Core.php+99
Use of undefined constant DYPG_DIR - assumed 'DYPG_DIR' (this will throw an Error in a future version of PHP)
- The uninstall procedure has failed, leaving 6 options in the database
- db_upgraded
- can_compress_scripts
- theysaidso_admin_options
- widget_recent-posts
- widget_theysaidso_widget
- widget_recent-comments
Smoke tests 50% from 4 tests
Server-side errors Passed 1 test
🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Good news, no errors were detected
SRP 0% from 2 tests
🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please fix the following
- 3× PHP files perform the action of outputting non-empty strings when accessed directly:
- > /wp-content/plugins/daneshjooyar-post-gallery/Core/View/shortcode_gallery_view.php
- > /wp-content/plugins/daneshjooyar-post-gallery/daneshjooyar-post-gallery.php
- > /wp-content/plugins/daneshjooyar-post-gallery/core/view/gallery-shortcode.php
- 5× PHP files trigger server-side errors or warnings when accessed directly:
- > PHP Notice
Undefined variable: dy_post_gallery_images in wp-content/plugins/daneshjooyar-post-gallery/Core/View/shortcode_gallery_view.php on line 2
- > PHP Fatal error
Uncaught Error: Call to undefined function _e() in wp-content/plugins/daneshjooyar-post-gallery/core/view/metabox-view.php:8
- > PHP Warning
Invalid argument supplied for foreach() in wp-content/plugins/daneshjooyar-post-gallery/core/view/gallery-shortcode.php on line 8
- > PHP Warning
Invalid argument supplied for foreach() in wp-content/plugins/daneshjooyar-post-gallery/Core/View/shortcode_gallery_view.php on line 2
- > PHP Notice
Undefined variable: dy_post_gallery_images in wp-content/plugins/daneshjooyar-post-gallery/core/view/gallery-shortcode.php on line 8
- > PHP Notice
User-side errors Passed 1 test
🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test
Optimizations
Plugin configuration Passed 29 tests
readme.txt Passed 16 tests
Often overlooked, readme.txt is one of the most important files in your plugin
4 plugin tags: slick, swipebox, slider, gallery
daneshjooyar-post-gallery/daneshjooyar-post-gallery.php Passed 13 tests
"Daneshjooyar Post Gallery" version 1.0.1's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
46 characters long description:
This is simple Gallery for post with shortcode
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
No dangerous file extensions were detected713 lines of code in 20 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
CSS | 5 | 55 | 15 | 372 |
PHP | 8 | 68 | 193 | 227 |
JavaScript | 4 | 15 | 19 | 60 |
PO File | 1 | 16 | 24 | 40 |
SVG | 2 | 1 | 0 | 14 |
PHP code Passed 2 tests
A short review of cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.30 |
Average class complexity | 19.00 |
▷ Minimum class complexity | 19.00 |
▷ Maximum class complexity | 19.00 |
Average method complexity | 2.17 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 3.00 |
Code structure | ||
---|---|---|
Namespaces | 0 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 2 | |
▷ Abstract classes | 0 | 0.00% |
▷ Concrete classes | 2 | 100.00% |
▷ Final classes | 0 | 0.00% |
Methods | 20 | |
▷ Static methods | 0 | 0.00% |
▷ Public methods | 16 | 80.00% |
▷ Protected methods | 0 | 0.00% |
▷ Private methods | 4 | 20.00% |
Functions | 10 | |
▷ Named functions | 0 | 0.00% |
▷ Anonymous functions | 10 | 100.00% |
Constants | 12 | |
▷ Global constants | 12 | 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
4 PNG files occupy 0.02MB with 0.00MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
Assets/img/play.png | 7.97KB | 7.88KB | ▼ 1.14% |
assets/img/icons.png | 0.71KB | 0.43KB | ▼ 39.64% |
Assets/img/icons.png | 0.71KB | 0.43KB | ▼ 39.64% |
assets/img/play_icon.png | 7.97KB | 7.88KB | ▼ 1.14% |