Benchmarks
Plugin footprint 40% from 16 tests
Installer 0% from 1 test
🔺 Critical test (weight: 50) | The install procedure must perform silently
The following installer errors require your attention
- This plugin did not install gracefully
- > Notice in wp-content/plugins/file-gallery/includes/media-tags.php+97
Trying to access array offset on value of type bool
Server metrics [RAM: ▼0.82MB] [CPU: ▼37.56ms] Passed 4 tests
An overview of server-side resources used by File Gallery
This plugin does not affect your website's performance
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.58 ▲0.12 | 48.01 ▲3.19 |
Dashboard /wp-admin | 3.12 ▼0.18 | 30.82 ▼20.38 |
Posts /wp-admin/edit.php | 3.12 ▼0.23 | 25.74 ▼23.43 |
Add New Post /wp-admin/post-new.php | 3.12 ▼2.76 | 27.88 ▼88.29 |
Media Library /wp-admin/upload.php | 3.12 ▼0.11 | 22.83 ▼18.13 |
Media tags /wp-admin/edit-tags.php?taxonomy=media_tag&post_type=attachment | 3.13 | 27.69 |
Server storage [IO: ▲1.93MB] [DB: ▲0.00MB] Passed 3 tests
Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 150 new files
Database: no new tables, 7 new options
New WordPress options |
---|
widget_recent-comments |
can_compress_scripts |
file_gallery |
widget_theysaidso_widget |
db_upgraded |
widget_recent-posts |
theysaidso_admin_options |
Browser metrics Passed 4 tests
A check of browser resources used by File Gallery
There were no issues detected in relation to browser resource usage
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,793 ▲32 | 14.35 ▼0.07 | 1.81 ▲0.08 | 43.45 ▲0.09 |
Dashboard /wp-admin | 2,202 ▲28 | 5.59 ▼0.06 | 82.53 ▼6.82 | 38.51 ▼8.56 |
Posts /wp-admin/edit.php | 2,128 ▲31 | 2.03 ▲0.05 | 38.18 ▲3.36 | 38.21 ▲0.07 |
Add New Post /wp-admin/post-new.php | 2,554 ▲1,028 | 21.93 ▼1.33 | 749.51 ▲94.88 | 74.46 ▲13.28 |
Media Library /wp-admin/upload.php | 1,421 ▲24 | 4.23 ▲0.08 | 96.96 ▼15.06 | 43.62 ▼3.34 |
Media tags /wp-admin/edit-tags.php?taxonomy=media_tag&post_type=attachment | 1,253 | 2.12 | 26.50 | 29.81 |
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
You still need to fix the following
- Uninstall procedure validation failed for this plugin
- > Deprecated in wp-content/plugins/file-gallery/includes/media-tags.php+48
Function create_function() is deprecated
- This plugin did not uninstall successfully, leaving 7 options in the database
- widget_recent-posts
- theysaidso_admin_options
- can_compress_scripts
- widget_recent-comments
- widget_theysaidso_widget
- file_gallery
- db_upgraded
Smoke tests 25% from 4 tests
Server-side errors 0% from 1 test
🔹 Test weight: 20 | A smoke test targeting server-side errors
Almost there, just fix the following server-side errors
- 8 occurences, only the last one shown
- > GET request to /wp-admin/edit-tags.php?taxonomy=media_tag&post_type=attachment
- > Deprecated in wp-content/plugins/file-gallery/includes/media-settings.php+43
Function create_function() is deprecated
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 items
- 4× GET requests to PHP files return non-empty strings:
- > /wp-content/plugins/file-gallery/templates/file-gallery/gallery.php
- > /wp-content/plugins/file-gallery/templates/simple/gallery.php
- > /wp-content/plugins/file-gallery/templates/list/gallery.php
- > /wp-content/plugins/file-gallery/templates/default/gallery.php
- 65× PHP files trigger server errors when accessed directly (only 10 are shown):
- > PHP Notice
Undefined variable: itemtag in wp-content/plugins/file-gallery/templates/default/gallery.php on line 9
- > PHP Notice
Undefined variable: endcol in wp-content/plugins/file-gallery/templates/simple/gallery.php on line 30
- > PHP Notice
Undefined variable: thumb_link in wp-content/plugins/file-gallery/templates/simple/gallery.php on line 33
- > PHP Notice
Undefined variable: post in wp-content/plugins/file-gallery/includes/templates-media-wp43.php on line 4
- > PHP Notice
Undefined variable: title in wp-content/plugins/file-gallery/templates/default/gallery.php on line 13
- > PHP Notice
Trying to get property 'ID' of non-object in wp-content/plugins/file-gallery/includes/templates-media-wp39.php on line 5
- > PHP Notice
Undefined variable: delete_what in wp-content/plugins/file-gallery/includes/main-form.php on line 35
- > PHP Fatal error
Uncaught Error: Call to undefined function add_action() in wp-content/plugins/file-gallery/includes/tinymce.php:9
- > PHP Notice
Undefined variable: thumb_link in wp-content/plugins/file-gallery/templates/file-gallery/gallery.php on line 11
- > PHP Notice
Undefined variable: file_gallery_this_template_counter in wp-content/plugins/file-gallery/templates/simple/gallery.php on line 19
- > PHP Notice
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 90% from 29 tests
readme.txt 88% 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 to be fixed:
- Tags: Please reduce the number of tags, currently 21 tag instead of maximum 10
- Screenshots: These screenshots do not have images: #1 (File Gallery main box on editing screen), #2 (Edit attachment data), #3 (Copy all attachments from another post), #4 (Deleting attachments that have copies), #5 (Build a gallery by choosing media tags), #6 (Settings page), #7 (Post thumb and number of attachments as extras in this view), #8 (Copying attachments from media library), #9 (With "WPML Multilingual CMS" plugin istalled, you'll be able to copy), #10 (Custom fields for attachments)
file-gallery/file-gallery.php 92% from 13 tests
Analyzing the main PHP file in "File Gallery" version 1.8.5.4
Please make the necessary changes and fix the following:
- Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 208 characters long)
Code Analysis 97% from 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 plugin17,267 lines of code in 54 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 29 | 1,988 | 2,819 | 8,698 |
PO File | 7 | 1,626 | 3,152 | 3,571 |
JavaScript | 7 | 504 | 172 | 2,183 |
CSS | 10 | 414 | 43 | 2,009 |
HTML | 1 | 29 | 0 | 806 |
PHP code 50% from 2 tests
Analyzing cyclomatic complexity and code structure
Please tend to the following items
- Please reduce cyclomatic complexity of methods to less than 100 (currently 653)
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.61 |
Average class complexity | 144.62 |
▷ Minimum class complexity | 1.00 |
▷ Maximum class complexity | 765.00 |
Average method complexity | 20.46 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 653.00 |
Code structure | ||
---|---|---|
Namespaces | 0 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 8 | |
▷ Abstract classes | 0 | 0.00% |
▷ Concrete classes | 8 | 100.00% |
▷ Final classes | 0 | 0.00% |
Methods | 60 | |
▷ Static methods | 5 | 8.33% |
▷ Public methods | 36 | 60.00% |
▷ Protected methods | 1 | 1.67% |
▷ Private methods | 23 | 38.33% |
Functions | 102 | |
▷ Named functions | 102 | 100.00% |
▷ Anonymous functions | 0 | 0.00% |
Constants | 77 | |
▷ Global constants | 19 | 24.68% |
▷ Class constants | 58 | 75.32% |
▷ Public constants | 58 | 100.00% |
Plugin size 50% from 2 tests
Image compression 50% from 2 tests
It is recommended to compress PNG files in your plugin to minimize bandwidth usage
78 PNG files occupy 0.60MB with 0.10MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
images/famfamfam_silk/lock_open.png | 0.71KB | 0.84KB | 0.00% |
css/images/ui-bg_glass_75_e6e6e6_1x400.png | 0.26KB | 0.15KB | ▼ 42.37% |
images/famfamfam_silk/tag_blue.png | 0.57KB | 0.61KB | 0.00% |
help/images/19.png | 23.33KB | 17.30KB | ▼ 25.87% |
images/white-grad.png | 0.21KB | 0.18KB | ▼ 12.38% |