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: ▲3.98MB] [CPU: ▲20.31ms] Passed 4 tests
Analyzing server-side resources used by Document Viewer for Office
Normal server usage
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 7.80 ▲4.33 | 58.31 ▲16.32 |
Dashboard /wp-admin | 7.82 ▲4.51 | 71.92 ▲20.99 |
Posts /wp-admin/edit.php | 7.82 ▲4.46 | 71.35 ▲21.33 |
Add New Post /wp-admin/post-new.php | 8.48 ▲2.60 | 128.92 ▲22.59 |
Media Library /wp-admin/upload.php | 7.82 ▲4.59 | 68.88 ▲30.76 |
Freemius Debug [v.2.5.10] /wp-admin/admin.php?page=freemius | 7.82 | 55.67 |
Server storage [IO: ▲4.68MB] [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: 364 new files
Database: no new tables, 9 new options
New WordPress options |
---|
theysaidso_admin_options |
widget_recent-comments |
widget_recent-posts |
fs_active_plugins |
fs_accounts |
db_upgraded |
widget_theysaidso_widget |
can_compress_scripts |
fs_debug_mode |
Browser metrics Passed 4 tests
A check of browser resources used by Document Viewer for Office
Normal browser usage
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,851 ▲65 | 14.23 ▼0.05 | 1.99 ▼0.05 | 29.01 ▼14.53 |
Dashboard /wp-admin | 2,215 ▲41 | 5.68 ▼0.04 | 85.86 ▼2.93 | 80.40 ▲32.44 |
Posts /wp-admin/edit.php | 2,161 ▲61 | 2.31 ▲0.36 | 37.50 ▼4.25 | 35.21 ▼5.79 |
Add New Post /wp-admin/post-new.php | 1,554 ▲28 | 23.11 ▲0.00 | 643.17 ▼11.72 | 34.45 ▼18.96 |
Media Library /wp-admin/upload.php | 1,450 ▲50 | 4.39 ▲0.17 | 101.54 ▼1.44 | 72.84 ▲26.33 |
Freemius Debug [v.2.5.10] /wp-admin/admin.php?page=freemius | 1,133 | 1.95 | 27.14 | 27.89 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 50% from 4 tests
🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
Please fix the following items
- The plugin did not uninstall gracefully
- > Notice in wp-content/plugins/embed-office-viewer/freemius/includes/class-freemius.php+8486
Undefined property: stdClass::$plugins
- Zombie WordPress options detected upon uninstall: 9 options
- widget_recent-posts
- fs_debug_mode
- fs_active_plugins
- theysaidso_admin_options
- can_compress_scripts
- db_upgraded
- fs_accounts
- widget_theysaidso_widget
- widget_recent-comments
Smoke tests 75% from 4 tests
Server-side errors Passed 1 test
🔹 Test weight: 20 | A smoke test targeting server-side errors
Good news, no errors were detected
SRP 50% from 2 tests
🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please fix the following items
- 11× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
- > PHP Warning
Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/embed-office-viewer/admin/global/free-plugin-list.php on line 2
- > PHP Fatal error
require_once(): Failed opening required 'ABSPATHwp-admin/includes/plugin-install.php' (include_path='.:/usr/share/php') in wp-content/plugins/embed-office-viewer/admin/global/free-plugin-list.php on line 2
- > PHP Fatal error
Uncaught Error: Call to undefined function EOV\\PostType\\add_action() in wp-content/plugins/embed-office-viewer/inc/PostType/OfficeViewer.php:9
- > PHP Fatal error
Uncaught Error: Call to undefined function EOV\\PostType\\add_action() in wp-content/plugins/embed-office-viewer/inc/PostType/OfficeViewer.php:9
- > PHP Fatal error
Uncaught Error: Call to undefined function get_site_url() in wp-content/plugins/embed-office-viewer/admin/codestar-framework/metabox-free.php:2
- > PHP Fatal error
Uncaught Error: Call to undefined function add_action() in wp-content/plugins/embed-office-viewer/admin/global/help-usages.php:6
- > PHP Fatal error
Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/embed-office-viewer/embed-office-viewer.php:14
- > PHP Fatal error
Uncaught Error: Access to undeclared static property: EOV\\Model\\GlobalChanges::$_instaance in wp-content/plugins/embed-office-viewer/inc/Model/GlobalChanges.php:13
- > PHP Warning
require_once(ABSPATHwp-admin/includes/plugin-install.php): failed to open stream: No such file or directory in wp-content/plugins/embed-office-viewer/admin/global/free-plugin-list.php on line 2
- > PHP Fatal error
Uncaught Error: Call to undefined function EOV\\Services\\add_shortcode() in wp-content/plugins/embed-office-viewer/inc/Services/Shortcode.php:9
- > PHP Warning
User-side errors Passed 1 test
🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser errors were detected
Optimizations
Plugin configuration 96% from 29 tests
readme.txt Passed 16 tests
The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
4 plugin tags: ms word, embed document, pdf, document viewer
embed-office-viewer/embed-office-viewer.php 92% from 13 tests
"Document Viewer for Office" version 2.2.8's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
Please take the time to fix the following:
- Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug
Code Analysis 97% from 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
Success! There were no dangerous files found in this plugin68,315 lines of code in 294 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 221 | 11,451 | 18,744 | 48,258 |
PO File | 20 | 3,037 | 3,414 | 6,180 |
Sass | 15 | 952 | 3 | 4,811 |
CSS | 20 | 286 | 479 | 4,465 |
JavaScript | 15 | 1,313 | 484 | 4,385 |
Markdown | 1 | 68 | 0 | 214 |
SVG | 2 | 0 | 0 | 2 |
PHP code 50% from 2 tests
A short review of cyclomatic complexity and code structure
These items need your attention
- Class cyclomatic complexity has to be reduced to less than 1000 (currently 3,073)
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.63 |
Average class complexity | 50.95 |
▷ Minimum class complexity | 1.00 |
▷ Maximum class complexity | 3,073.00 |
Average method complexity | 4.91 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 94.00 |
Code structure | ||
---|---|---|
Namespaces | 4 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 119 | |
▷ Abstract classes | 4 | 3.36% |
▷ Concrete classes | 115 | 96.64% |
▷ Final classes | 0 | 0.00% |
Methods | 1,550 | |
▷ Static methods | 259 | 16.71% |
▷ Public methods | 1,161 | 74.90% |
▷ Protected methods | 17 | 1.10% |
▷ Private methods | 372 | 24.00% |
Functions | 130 | |
▷ Named functions | 130 | 100.00% |
▷ Anonymous functions | 0 | 0.00% |
Constants | 148 | |
▷ Global constants | 101 | 68.24% |
▷ Class constants | 47 | 31.76% |
▷ Public constants | 47 | 100.00% |
Plugin size Passed 2 tests
Image compression Passed 2 tests
Often times overlooked, PNG files can occupy unnecessary space in your plugin
5 PNG files occupy 0.02MB with 0.01MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
admin/skydrive.png | 0.54KB | 0.53KB | ▼ 2.00% |
freemius/assets/img/theme-icon.png | 10.97KB | 5.78KB | ▼ 47.37% |
img/icon.png | 1.59KB | 0.72KB | ▼ 54.62% |
freemius/assets/img/plugin-icon.png | 9.16KB | 5.26KB | ▼ 42.58% |
admin/codestar-framework/assets/images/checkerboard.png | 2.29KB | 2.54KB | 0.00% |