Benchmarks
Plugin footprint 83% from 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed gracefully, with no errors
Server metrics [RAM: ▲0.40MB] [CPU: ▼1.65ms] Passed 4 tests
A check of server-side resources used by Post Draft Preview
No issues were detected with server-side resource usage
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.88 ▲0.41 | 41.96 ▲2.10 |
Dashboard /wp-admin | 3.71 ▲0.37 | 47.11 ▼11.43 |
Posts /wp-admin/edit.php | 3.76 ▲0.41 | 52.62 ▲4.23 |
Add New Post /wp-admin/post-new.php | 6.31 ▲0.43 | 93.14 ▼1.18 |
Media Library /wp-admin/upload.php | 3.63 ▲0.41 | 35.89 ▲3.90 |
Post Draft Preview /wp-admin/tools.php?page=pdp-dashboard | 3.57 | 32.78 |
Server storage [IO: ▲3.98MB] [DB: ▲0.00MB] Passed 3 tests
A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 1,672 new files
Database: no new tables, 6 new options
New WordPress options |
---|
db_upgraded |
widget_recent-posts |
can_compress_scripts |
widget_theysaidso_widget |
widget_recent-comments |
theysaidso_admin_options |
Browser metrics Passed 4 tests
A check of browser resources used by Post Draft Preview
Minimal impact on browser resources
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,888 ▲141 | 13.38 ▼0.71 | 8.53 ▲6.97 | 40.30 ▼2.98 |
Dashboard /wp-admin | 2,211 ▲31 | 5.65 ▲0.06 | 93.68 ▼2.43 | 38.38 ▼5.36 |
Posts /wp-admin/edit.php | 2,113 ▲16 | 2.01 ▼0.01 | 41.39 ▲0.29 | 35.39 ▼4.77 |
Add New Post /wp-admin/post-new.php | 1,538 ▲8 | 23.39 ▲0.44 | 677.99 ▲30.19 | 54.16 ▲6.59 |
Media Library /wp-admin/upload.php | 1,416 ▲13 | 4.25 ▲0.08 | 99.01 ▲3.38 | 43.62 ▲1.51 |
Post Draft Preview /wp-admin/tools.php?page=pdp-dashboard | 871 | 2.05 | 23.04 | 28.43 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 75% from 4 tests
🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
You still need to fix the following
- This plugin does not fully uninstall, leaving 6 options in the database
- widget_recent-posts
- widget_theysaidso_widget
- db_upgraded
- theysaidso_admin_options
- can_compress_scripts
- widget_recent-comments
Smoke tests 50% from 4 tests
Server-side errors 0% from 1 test
🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
These errors were triggered by the plugin
- 2 occurences, only the last one shown
- > GET request to /wp-admin/tools.php?page=pdp-dashboard
- > request to
- > Notice in wp-config.php+20
Undefined index: REQUEST_METHOD
SRP 50% from 2 tests
🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please fix the following
- 336× PHP files trigger server errors when accessed directly (only 10 are shown):
- > PHP Fatal error
Uncaught Error: Class 'Illuminate\\Support\\Facades\\Facade' not found in wp-content/plugins/post-draft-preview/vendor/illuminate/support/Facades/App.php:47
- > PHP Fatal error
Uncaught Error: Interface 'Symfony\\Component\\Translation\\Loader\\LoaderInterface' not found in wp-content/plugins/post-draft-preview/vendor/symfony/translation/Loader/ArrayLoader.php:21
- > PHP Fatal error
Uncaught Error: Interface 'Symfony\\Contracts\\Translation\\TranslatorInterface' not found in wp-content/plugins/post-draft-preview/vendor/symfony/translation/PseudoLocalizationTranslator.php:19
- > PHP Fatal error
Uncaught Error: Interface 'Symfony\\Component\\Translation\\Writer\\TranslationWriterInterface' not found in wp-content/plugins/post-draft-preview/vendor/symfony/translation/Writer/TranslationWriter.php:24
- > PHP Fatal error
Uncaught Error: Interface 'Carbon\\Exceptions\\BadMethodCallException' not found in wp-content/plugins/post-draft-preview/vendor/nesbot/carbon/src/Carbon/Exceptions/BadFluentConstructorException.php:17
- > PHP Fatal error
Uncaught Error: Class 'Illuminate\\Support\\Facades\\Facade' not found in wp-content/plugins/post-draft-preview/vendor/illuminate/support/Facades/Route.php:42
- > PHP Fatal error
Uncaught Error: Interface 'Illuminate\\Contracts\\Support\\MessageProvider' not found in wp-content/plugins/post-draft-preview/vendor/illuminate/contracts/Validation/Validator.php:7
- > PHP Fatal error
Uncaught Error: Class 'Composer\\Installers\\BaseInstaller' not found in wp-content/plugins/post-draft-preview/vendor/composer/installers/src/Composer/Installers/ZikulaInstaller.php:4
- > PHP Fatal error
Uncaught Error: Class 'Composer\\Installers\\BaseInstaller' not found in wp-content/plugins/post-draft-preview/vendor/composer/installers/src/Composer/Installers/PuppetInstaller.php:5
- > PHP Fatal error
Uncaught Error: Interface 'Symfony\\Component\\Translation\\Loader\\LoaderInterface' not found in wp-content/plugins/post-draft-preview/vendor/symfony/translation/Loader/QtFileLoader.php:26
- > PHP Fatal error
User-side errors Passed 1 test
🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side
Optimizations
Plugin configuration 96% from 29 tests
readme.txt Passed 16 tests
The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
4 plugin tags: post draft, post preview, draft preview, public link
post-draft-preview/post-draft-preview.php 92% from 13 tests
The entry point to "Post Draft Preview" version 1.2.1 is a PHP file that has certain tags in its header comment area
You should first fix the following items:
- 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 3% from 3 tests
File types 0% from 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
Almost there! Just fix the following issues
- For security reasons, never distribute binary or executable files with your plugin
- .bat - Batch File in Windows
- ☣ wp-content/plugins/post-draft-preview/vendor/nesbot/carbon/bin/carbon.bat
- .bat - Batch File in Windows
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 1,400 | 10,393 | 36,317 | 51,995 |
XSD | 3 | 92 | 48 | 2,803 |
JSON | 18 | 0 | 0 | 1,810 |
Markdown | 18 | 378 | 1 | 974 |
YAML | 3 | 31 | 3 | 123 |
reStructuredText | 1 | 74 | 78 | 75 |
PO File | 1 | 15 | 27 | 46 |
SVG | 1 | 0 | 0 | 19 |
Bourne Shell | 1 | 3 | 11 | 12 |
DOS Batch | 1 | 0 | 0 | 4 |
JavaScript | 3 | 0 | 0 | 3 |
CSS | 1 | 0 | 0 | 1 |
PHP code 50% from 2 tests
A short review of cyclomatic complexity and code structure
Please tend to the following items
- Cyclomatic complexity of methods has to be reduced to less than 100 (currently 140)
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.39 |
Average class complexity | 7.55 |
▷ Minimum class complexity | 1.00 |
▷ Maximum class complexity | 324.00 |
Average method complexity | 2.48 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 140.00 |
Code structure | ||
---|---|---|
Namespaces | 91 | |
Interfaces | 129 | |
Traits | 35 | |
Classes | 383 | |
▷ Abstract classes | 22 | 5.74% |
▷ Concrete classes | 361 | 94.26% |
▷ Final classes | 39 | 10.80% |
Methods | 3,203 | |
▷ Static methods | 643 | 20.07% |
▷ Public methods | 2,771 | 86.51% |
▷ Protected methods | 282 | 8.80% |
▷ Private methods | 150 | 4.68% |
Functions | 458 | |
▷ Named functions | 94 | 20.52% |
▷ Anonymous functions | 364 | 79.48% |
Constants | 196 | |
▷ Global constants | 11 | 5.61% |
▷ Class constants | 185 | 94.39% |
▷ Public constants | 182 | 98.38% |
Plugin size Passed 2 tests
Image compression Passed 2 tests
Using a strong compression for your PNG files is a great way to speed-up your plugin
No PNG files were detected