Benchmarks
Plugin footprint 58% from 16 tests
Installer 0% from 1 test
🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
It is recommended to fix the following installer errors
- Install procedure had errors
- > Notice in wp-content/plugins/document-gallery/inc/class-thumber.php+150
Trying to access array offset on value of type null
Server metrics [RAM: ▲0.53MB] [CPU: ▼1.92ms] Passed 4 tests
Server-side resources used by Document Gallery
Normal server usage
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.93 ▲0.47 | 46.26 ▲6.24 |
Dashboard /wp-admin | 3.87 ▲0.53 | 48.96 ▼14.15 |
Posts /wp-admin/edit.php | 3.92 ▲0.57 | 50.07 ▲1.77 |
Add New Post /wp-admin/post-new.php | 6.48 ▲0.59 | 97.00 ▼1.55 |
Media Library /wp-admin/upload.php | 3.79 ▲0.56 | 39.13 ▲8.72 |
Document Gallery /wp-admin/options-general.php?page=document_gallery | 3.94 | 37.12 |
Server storage [IO: ▲1.17MB] [DB: ▲0.00MB] Passed 3 tests
How much does this plugin use your filesystem and database?
This plugin installed successfully
Filesystem: 103 new files
Database: no new tables, 7 new options
New WordPress options |
---|
widget_theysaidso_widget |
widget_recent-posts |
theysaidso_admin_options |
db_upgraded |
widget_recent-comments |
can_compress_scripts |
document_gallery |
Browser metrics Passed 4 tests
An overview of browser requirements for Document Gallery
Normal browser usage
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,923 ▲161 | 13.44 ▼1.27 | 9.63 ▲7.86 | 43.24 ▼1.49 |
Dashboard /wp-admin | 2,212 ▲35 | 5.70 ▲0.11 | 91.47 ▼7.24 | 41.58 ▼2.89 |
Posts /wp-admin/edit.php | 2,117 ▲14 | 2.06 ▲0.09 | 40.49 ▼1.08 | 34.65 ▼3.45 |
Add New Post /wp-admin/post-new.php | 1,555 ▲29 | 23.47 ▼0.12 | 651.11 ▼16.23 | 52.60 ▲1.87 |
Media Library /wp-admin/upload.php | 1,420 ▲20 | 4.26 ▲0.09 | 96.77 ▲0.48 | 40.23 ▼0.21 |
Document Gallery /wp-admin/options-general.php?page=document_gallery | 1,254 | 2.43 | 27.31 | 34.16 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 75% from 4 tests
🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
Please fix the following items
- This plugin does not fully uninstall, leaving 6 options in the database
- widget_recent-comments
- widget_recent-posts
- widget_theysaidso_widget
- db_upgraded
- can_compress_scripts
- theysaidso_admin_options
Smoke tests 75% from 4 tests
Server-side errors Passed 1 test
🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though everything seems fine, this is not an exhaustive test
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
Please fix the following
- 4× PHP files trigger server-side errors or warnings when accessed directly:
- > PHP Fatal error
Uncaught Error: Call to undefined function _e() in wp-content/plugins/document-gallery/admin/media-manager-template.php:5
- > PHP Warning
include_once(DG_PATHinc/class-gallery.php): failed to open stream: No such file or directory in wp-content/plugins/document-gallery/admin/media-manager-template.php on line 2
- > PHP Warning
include_once(): Failed opening 'DG_PATHinc/class-gallery.php' for inclusion (include_path='.:/usr/share/php') in wp-content/plugins/document-gallery/admin/media-manager-template.php on line 2
- > PHP Warning
Use of undefined constant DG_PATH - assumed 'DG_PATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/document-gallery/admin/media-manager-template.php on line 2
- > 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 97% from 29 tests
readme.txt 94% from 16 tests
Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
These attributes need your attention:
- Screenshots: Please add images for these screenshots: #1 (Document Gallery integrates directly with the WordPress Media Manager.), #2 (The common configuration options are directly accessible through the Media Manager), #3 (This is an example of "fancy" thumbnails. The images are a copy of the front), #4 (This is an example of multiple Document Galleries on a single page (using), #5 (This is how the Document Gallery looks with `descriptions=false` (default).)
document-gallery/document-gallery.php Passed 13 tests
This is the main PHP file of "Document Gallery" version 4.4.4, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
92 characters long description:
Display non-images (and images) in gallery format on a page or post with the [dg] shortcode.
Code Analysis Passed 3 tests
File types Passed 1 test
🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
There were no executable files found in this plugin7,861 lines of code in 51 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 34 | 1,009 | 2,298 | 4,146 |
PO File | 6 | 560 | 582 | 1,622 |
JavaScript | 6 | 123 | 219 | 881 |
CSS | 4 | 144 | 18 | 757 |
Markdown | 1 | 84 | 0 | 455 |
PHP code Passed 2 tests
This plugin's cyclomatic complexity and code structure detailed below
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.38 |
Average class complexity | 19.70 |
▷ Minimum class complexity | 1.00 |
▷ Maximum class complexity | 63.00 |
Average method complexity | 2.63 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 17.00 |
Code structure | ||
---|---|---|
Namespaces | 0 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 27 | |
▷ Abstract classes | 2 | 7.41% |
▷ Concrete classes | 25 | 92.59% |
▷ Final classes | 0 | 0.00% |
Methods | 313 | |
▷ Static methods | 185 | 59.11% |
▷ Public methods | 220 | 70.29% |
▷ Protected methods | 18 | 5.75% |
▷ Private methods | 75 | 23.96% |
Functions | 27 | |
▷ Named functions | 27 | 100.00% |
▷ Anonymous functions | 0 | 0.00% |
Constants | 18 | |
▷ Global constants | 8 | 44.44% |
▷ Class constants | 10 | 55.56% |
▷ Public constants | 10 | 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
40 PNG files occupy 0.56MB with 0.28MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
assets/icons/opendocument-presentation.png | 6.95KB | 3.32KB | ▼ 52.30% |
assets/icons/rtf.png | 9.40KB | 5.08KB | ▼ 45.89% |
assets/icons/opendocument-database.png | 8.03KB | 3.60KB | ▼ 55.17% |
assets/icons/opendocument-formula.png | 7.91KB | 4.14KB | ▼ 47.68% |
assets/icons/html.png | 9.11KB | 4.44KB | ▼ 51.25% |