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
- The plugin did not install without errors
- > Deprecated in wp-content/plugins/post-to-docx/post-to-docx.php+27
Methods with the same name as their class will not be constructors in a future version of PHP; Posttodocx has a deprecated constructor
Server metrics [RAM: ▼1.91MB] [CPU: ▼53.25ms] Passed 4 tests
A check of server-side resources used by WP Post to DOCX
This plugin has minimal impact on server resources
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 2.08 ▼1.38 | 4.55 ▼38.24 |
Dashboard /wp-admin | 2.10 ▼1.20 | 6.20 ▼46.07 |
Posts /wp-admin/edit.php | 2.10 ▼1.25 | 6.51 ▼43.29 |
Add New Post /wp-admin/post-new.php | 2.10 ▼3.79 | 5.39 ▼85.38 |
Media Library /wp-admin/upload.php | 2.10 ▼1.13 | 5.40 ▼30.24 |
Post to DOCX /wp-admin/options-general.php?page=post-to-docx/post-to-docx.php | 2.10 | 6.67 |
Server storage [IO: ▲3.73MB] [DB: ▲0.00MB] Passed 3 tests
Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 179 new files
Database: no new tables, 7 new options
New WordPress options |
---|
widget_recent-comments |
posttodocx |
can_compress_scripts |
widget_theysaidso_widget |
theysaidso_admin_options |
db_upgraded |
widget_recent-posts |
Browser metrics Passed 4 tests
WP Post to DOCX: an overview of browser usage
Minimal impact on browser resources
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,793 ▲32 | 14.35 ▲0.08 | 1.80 ▲0.15 | 44.84 ▼2.94 |
Dashboard /wp-admin | 2,202 ▲28 | 5.59 ▲0.06 | 83.69 ▼8.64 | 40.18 ▼1.44 |
Posts /wp-admin/edit.php | 2,104 ▲1 | 2.03 ▲0.03 | 36.07 ▼3.08 | 36.63 ▼4.30 |
Add New Post /wp-admin/post-new.php | 1,529 ▲3 | 23.73 ▲0.64 | 729.56 ▲47.64 | 63.84 ▲12.00 |
Media Library /wp-admin/upload.php | 1,398 ▼2 | 4.21 ▲0.09 | 101.30 ▼5.94 | 43.80 ▼1.29 |
Post to DOCX /wp-admin/options-general.php?page=post-to-docx/post-to-docx.php | 845 | 2.01 | 24.36 | 27.83 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 50% from 4 tests
🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
- This plugin did not uninstall without warnings or errors
- > Deprecated in wp-content/plugins/post-to-docx/post-to-docx.php+27
Methods with the same name as their class will not be constructors in a future version of PHP; Posttodocx has a deprecated constructor
- The uninstall procedure has failed, leaving 7 options in the database
- theysaidso_admin_options
- posttodocx
- db_upgraded
- widget_recent-posts
- widget_theysaidso_widget
- widget_recent-comments
- can_compress_scripts
Smoke tests 0% from 4 tests
Server-side errors 0% from 1 test
🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Please fix the following server-side errors
- > GET request to /wp-admin/options-general.php?page=post-to-docx/post-to-docx.php
- > Deprecated in wp-content/plugins/post-to-docx/post-to-docx.php+27
Methods with the same name as their class will not be constructors in a future version of PHP; Posttodocx has a deprecated constructor
- > GET request to /wp-admin/options-general.php?page=post-to-docx/post-to-docx.php
- > Warning in wp-content/plugins/post-to-docx/post-to-docx.php+25
Use of undefined constant Posttodocx - assumed 'Posttodocx' (this will throw an Error in a future version of PHP)
- > GET request to /wp-admin/options-general.php?page=post-to-docx/post-to-docx.php
- > Notice in wp-content/plugins/post-to-docx/posttodocx_options.php+22
Undefined index: attachment
- > GET request to /wp-admin/options-general.php?page=post-to-docx/post-to-docx.php
- > Notice in wp-content/plugins/post-to-docx/posttodocx_options.php+33
Undefined index: nonPublic
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
- 2× GET requests to PHP files return non-empty strings:
- > /wp-content/plugins/post-to-docx/phpdocx/examples/easy/SetLanguage.php
- > /wp-content/plugins/post-to-docx/post-to-docx.php
- 62× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
- > PHP Fatal error
Uncaught Error: Class 'LoggerLayout' not found in wp-content/plugins/post-to-docx/phpdocx/lib/log4php/layouts/LoggerLayoutSerialized.php:33
- > PHP Fatal error
Uncaught Error: Class 'LoggerAppender' not found in wp-content/plugins/post-to-docx/phpdocx/lib/log4php/appenders/LoggerAppenderNull.php:30
- > PHP Warning
Declaration of CreateList::generatePSTYLE($val) should be compatible with CreateElement::generatePSTYLE($val = 'Textonotaa...') in /var/www/wordpress/wp-content/plugins/post-to-docx/phpdocx/classes/CreateList.inc on line 377
- > PHP Fatal error
Uncaught Error: Class 'LoggerAppenderFile' not found in wp-content/plugins/post-to-docx/phpdocx/lib/log4php/appenders/LoggerAppenderDailyFile.php:43
- > PHP Fatal error
Uncaught Error: Class 'LoggerLayout' not found in wp-content/plugins/post-to-docx/phpdocx/lib/log4php/layouts/LoggerLayoutXml.php:56
- > PHP Fatal error
Uncaught Error: Class 'LoggerPatternConverter' not found in wp-content/plugins/post-to-docx/phpdocx/lib/log4php/pattern/LoggerPatternConverterFile.php:29
- > PHP Fatal error
Uncaught Error: Class 'LoggerConfigurable' not found in wp-content/plugins/post-to-docx/phpdocx/lib/log4php/LoggerLayout.php:27
- > PHP Fatal error
Uncaught Error: Class 'LoggerPatternConverter' not found in wp-content/plugins/post-to-docx/phpdocx/lib/log4php/pattern/LoggerPatternConverterNewLine.php:29
- > PHP Fatal error
Uncaught Error: Class 'LoggerPatternConverter' not found in wp-content/plugins/post-to-docx/phpdocx/lib/log4php/pattern/LoggerPatternConverterRelative.php:30
- > PHP Fatal error
Uncaught Error: Interface 'LoggerConfigurator' not found in wp-content/plugins/post-to-docx/phpdocx/lib/log4php/configurators/LoggerConfiguratorDefault.php:31
- > PHP Fatal error
User-side errors 0% from 1 test
🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
These are user-side errors you should fix
- > GET request to /wp-admin/options-general.php?page=post-to-docx/post-to-docx.php
- > Network (severe)
wp-content/plugins/post-to-docx/asset/css/admin.css?ver=1.0 - Failed to load resource: the server responded with a status of 404 (Not Found)
Optimizations
Plugin configuration Passed 29 tests
readme.txt Passed 16 tests
You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
5 plugin tags: post, docx, posts, phpdocx, post to docx
post-to-docx/post-to-docx.php Passed 13 tests
The main PHP file in "WP Post to DOCX" ver. 1.0 adds more information about the plugin and also serves as the entry point for this plugin
46 characters long description:
Allow visitor to download post in DOCX format.
Code Analysis 5% from 3 tests
File types 0% from 1 test
🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Please make sure to remedy the following
- Do not include executable or dangerous files in your plugin
- .bin - Binary Executable in Windows, macOS, Linux
- ☣ wp-content/plugins/post-to-docx/phpdocx/excel/xl/printerSettings/printerSettings1.bin
- .bin - Binary Executable in Windows, macOS, Linux
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
XML | 21 | 2 | 17 | 37,488 |
PHP | 104 | 1,740 | 8,169 | 8,674 |
XSLT | 1 | 748 | 265 | 7,462 |
Pascal | 29 | 905 | 6,664 | 5,326 |
DTD | 1 | 25 | 54 | 69 |
CSS | 1 | 1 | 0 | 7 |
INI | 1 | 2 | 4 | 4 |
PHP code Passed 2 tests
This is a very shot review of cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.31 |
Average class complexity | 7.44 |
▷ Minimum class complexity | 1.00 |
▷ Maximum class complexity | 54.00 |
Average method complexity | 2.11 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 18.00 |
Code structure | ||
---|---|---|
Namespaces | 0 | |
Interfaces | 3 | |
Traits | 0 | |
Classes | 77 | |
▷ Abstract classes | 6 | 7.79% |
▷ Concrete classes | 71 | 92.21% |
▷ Final classes | 0 | 0.00% |
Methods | 468 | |
▷ Static methods | 56 | 11.97% |
▷ Public methods | 395 | 84.40% |
▷ Protected methods | 23 | 4.91% |
▷ Private methods | 50 | 10.68% |
Functions | 1 | |
▷ Named functions | 1 | 100.00% |
▷ Anonymous functions | 0 | 0.00% |
Constants | 51 | |
▷ Global constants | 5 | 9.80% |
▷ Class constants | 46 | 90.20% |
▷ Public constants | 46 | 100.00% |
Plugin size 50% from 2 tests
Image compression 50% from 2 tests
Using a strong compression for your PNG files is a great way to speed-up your plugin
5 PNG files occupy 0.66MB with 0.33MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
phpdocx/examples/files/img/imageP2.png | 140.73KB | 46.48KB | ▼ 66.98% |
phpdocx/examples/files/img/image.png | 32.33KB | 19.79KB | ▼ 38.80% |
phpdocx/examples/files/img/imageP1.png | 231.34KB | 64.58KB | ▼ 72.08% |
phpdocx/examples/files/img/imageP3.png | 270.93KB | 65.75KB | ▼ 75.73% |
assets/images/docx.png | 0.64KB | 0.70KB | 0.00% |