Benchmarks
Plugin footprint 83% from 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully
Server metrics [RAM: ▲0.16MB] [CPU: ▼9.00ms] Passed 4 tests
Server-side resources used by GS Only PDF Preview
No issues were detected with server-side resource usage
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.59 ▲0.12 | 38.52 ▼4.26 |
Dashboard /wp-admin | 3.45 ▲0.10 | 49.08 ▼9.21 |
Posts /wp-admin/edit.php | 3.56 ▲0.20 | 43.81 ▼1.86 |
Add New Post /wp-admin/post-new.php | 6.12 ▲0.23 | 81.28 ▼20.65 |
Media Library /wp-admin/upload.php | 3.46 ▲0.22 | 37.39 ▲3.37 |
Regen. PDF Previews /wp-admin/tools.php?page=gopp-regen-pdf-previews | 3.41 | 31.88 |
Server storage [IO: ▲0.12MB] [DB: ▲0.00MB] Passed 3 tests
Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 10 new files
Database: no new tables, 6 new options
New WordPress options |
---|
widget_theysaidso_widget |
widget_recent-posts |
can_compress_scripts |
widget_recent-comments |
db_upgraded |
theysaidso_admin_options |
Browser metrics Passed 4 tests
An overview of browser requirements for GS Only PDF Preview
Minimal impact on browser resources
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,820 ▲74 | 13.15 ▼1.20 | 1.71 ▼0.02 | 41.98 ▲0.50 |
Dashboard /wp-admin | 2,213 ▲28 | 5.83 ▲0.95 | 96.76 ▼4.37 | 41.76 ▼2.60 |
Posts /wp-admin/edit.php | 2,093 ▲4 | 2.06 ▲0.05 | 35.15 ▼1.12 | 33.23 ▼0.82 |
Add New Post /wp-admin/post-new.php | 1,536 ▲16 | 21.11 ▼2.03 | 658.98 ▼15.56 | 63.00 ▼3.92 |
Media Library /wp-admin/upload.php | 1,394 ▲6 | 4.21 ▼0.03 | 95.37 ▼3.70 | 44.92 ▼1.01 |
Regen. PDF Previews /wp-admin/tools.php?page=gopp-regen-pdf-previews | 760 | 2.07 | 24.56 | 24.50 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 75% from 4 tests
🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
- This plugin did not uninstall successfully, leaving 6 options in the database
- can_compress_scripts
- widget_recent-posts
- theysaidso_admin_options
- db_upgraded
- widget_recent-comments
- widget_theysaidso_widget
Smoke tests 75% from 4 tests
Server-side errors Passed 1 test
🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though everything seems fine, this is not an exhaustive test
SRP 50% 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
- 6× GET requests to PHP files trigger server-side errors or Error 500 responses:
- > PHP Fatal error
Uncaught Error: Class 'WP_Image_Editor' not found in wp-content/plugins/gs-only-pdf-preview/includes/class-gopp-image-editor-gs.php:21
- > PHP Warning
Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/gs-only-pdf-preview/includes/debug-gopp-image-editor-gs.php on line 6
- > PHP Fatal error
require_once(): Failed opening required 'ABSPATHWPINC/class-wp-image-editor.php' (include_path='.:/usr/share/php') in wp-content/plugins/gs-only-pdf-preview/includes/debug-gopp-image-editor-gs.php on line 6
- > PHP Warning
Use of undefined constant DAY_IN_SECONDS - assumed 'DAY_IN_SECONDS' (this will throw an Error in a future version of PHP) in wp-content/plugins/gs-only-pdf-preview/includes/class-gopp-image-editor-gs.php on line 10
- > PHP Warning
Use of undefined constant WPINC - assumed 'WPINC' (this will throw an Error in a future version of PHP) in wp-content/plugins/gs-only-pdf-preview/includes/debug-gopp-image-editor-gs.php on line 6
- > PHP Warning
require_once(ABSPATHWPINC/class-wp-image-editor.php): failed to open stream: No such file or directory in wp-content/plugins/gs-only-pdf-preview/includes/debug-gopp-image-editor-gs.php on line 6
- > PHP Fatal error
User-side errors Passed 1 test
🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
There were no browser issues found
Optimizations
Plugin configuration Passed 29 tests
readme.txt Passed 16 tests
Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
4 plugin tags: pdf, ghostscript, ghostscript only, pdf preview
gs-only-pdf-preview/gs-only-pdf-preview.php Passed 13 tests
"GS Only PDF Preview" version 1.0.7's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
51 characters long description:
Uses Ghostscript directly to generate PDF previews.
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,475 lines of code in 7 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 4 | 157 | 544 | 977 |
JavaScript | 2 | 38 | 49 | 266 |
PO File | 1 | 58 | 90 | 232 |
PHP code Passed 2 tests
This plugin's cyclomatic complexity and code structure detailed below
All good! No complexity issues found
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.65 |
Average class complexity | 87.33 |
▷ Minimum class complexity | 17.00 |
▷ Maximum class complexity | 149.00 |
Average method complexity | 5.47 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 37.00 |
Code structure | ||
---|---|---|
Namespaces | 0 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 3 | |
▷ Abstract classes | 0 | 0.00% |
▷ Concrete classes | 3 | 100.00% |
▷ Final classes | 0 | 0.00% |
Methods | 58 | |
▷ Static methods | 43 | 74.14% |
▷ Public methods | 48 | 82.76% |
▷ Protected methods | 10 | 17.24% |
▷ Private methods | 0 | 0.00% |
Functions | 0 | |
▷ Named functions | 0 | 0.00% |
▷ Anonymous functions | 0 | 0.00% |
Constants | 5 | |
▷ Global constants | 5 | 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
There are no PNG files in this plugin