Benchmarks
Plugin footprint 65% from 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | Checking the installer triggered no errors
This plugin's installer ran successfully
Server metrics [RAM: ▼0.95MB] [CPU: ▼35.76ms] Passed 4 tests
Server-side resources used by WP Book
Server-side resource usage in normal parameters
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.48 ▲0.02 | 38.17 ▼5.02 |
Dashboard /wp-admin | 3.00 ▼0.34 | 22.45 ▼35.78 |
Posts /wp-admin/edit.php | 3.00 ▼0.35 | 22.83 ▼21.99 |
Add New Post /wp-admin/post-new.php | 3.00 ▼2.88 | 20.18 ▼74.20 |
Media Library /wp-admin/upload.php | 3.00 ▼0.22 | 21.94 ▼11.08 |
WP Book /wp-admin/options-general.php?page=wp-book | 3.01 | 24.21 |
Server storage [IO: ▲12.90MB] [DB: ▲0.00MB] Passed 3 tests
Filesystem and database footprint
This plugin was installed successfully
Filesystem: 789 new files
Database: no new tables, 6 new options
New WordPress options |
---|
can_compress_scripts |
widget_recent-comments |
theysaidso_admin_options |
widget_theysaidso_widget |
widget_recent-posts |
db_upgraded |
Browser metrics Passed 4 tests
This is an overview of browser requirements for WP Book
This plugin has a minimal impact on browser resources
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,799 ▲53 | 13.27 ▼1.01 | 1.78 ▲0.07 | 43.45 ▲3.55 |
Dashboard /wp-admin | 2,202 ▲25 | 5.89 ▲0.20 | 107.31 ▲20.22 | 42.21 ▼0.88 |
Posts /wp-admin/edit.php | 2,117 ▲17 | 2.42 ▲0.41 | 37.50 ▼0.27 | 29.09 ▼3.91 |
Add New Post /wp-admin/post-new.php | 6,256 ▲4,730 | 21.86 ▼1.30 | 962.83 ▲285.69 | 38.34 ▼17.84 |
Media Library /wp-admin/upload.php | 1,410 ▲13 | 4.42 ▲0.14 | 110.90 ▲13.16 | 44.03 ▲2.13 |
WP Book /wp-admin/options-general.php?page=wp-book | 1,777 | 2.51 | 48.10 | 32.58 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 50% from 4 tests
🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
- This plugin cannot be uninstalled
- > User notice in wp-includes/functions.php+5905
Function add_submenu_page was called incorrectly. The seventh parameter passed to add_submenu_page() should be numeric representing menu position. Please see Debugging in WordPress for more information. (This message was added in version 5.3.0.)
- The uninstall procedure has failed, leaving 6 options in the database
- theysaidso_admin_options
- widget_recent-comments
- widget_recent-posts
- widget_theysaidso_widget
- can_compress_scripts
- db_upgraded
Smoke tests 50% from 4 tests
Server-side errors 0% from 1 test
🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Smoke test failed, please fix the following
- > GET request to /wp-admin/options-general.php?page=wp-book
- > User notice in wp-includes/functions.php+5905
Function add_submenu_page was called incorrectly. The seventh parameter passed to add_submenu_page() should be numeric representing menu position. Please see Debugging in WordPress for more information. (This message was added in version 5.3.0.)
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
The following issues need your attention
- 159× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
- > PHP Fatal error
Uncaught Error: Class 'Mpdf\\Tag\\Tag' not found in wp-content/plugins/wp-book/vendor/mpdf/mpdf/src/Tag/DotTab.php:5
- > PHP Fatal error
Uncaught Error: Class 'Mpdf\\Tag\\Tag' not found in wp-content/plugins/wp-book/vendor/mpdf/mpdf/src/Tag/NewColumn.php:5
- > PHP Fatal error
Uncaught Error: Interface 'DeepCopy\\Matcher\\Matcher' not found in wp-content/plugins/wp-book/vendor/myclabs/deep-copy/src/DeepCopy/Matcher/Doctrine/DoctrineProxyMatcher.php:11
- > PHP Fatal error
Uncaught Error: Class 'Mpdf\\Tag\\InlineTag' not found in wp-content/plugins/wp-book/vendor/mpdf/mpdf/src/Tag/Meter.php:7
- > PHP Fatal error
Uncaught Error: Class 'Mpdf\\Tag\\BlockTag' not found in wp-content/plugins/wp-book/vendor/mpdf/mpdf/src/Tag/Div.php:5
- > PHP Fatal error
Uncaught Error: Class 'Mpdf\\Tag\\BlockTag' not found in wp-content/plugins/wp-book/vendor/mpdf/mpdf/src/Tag/Article.php:5
- > PHP Fatal error
Uncaught Error: Interface 'DeepCopy\\Filter\\Filter' not found in wp-content/plugins/wp-book/vendor/myclabs/deep-copy/src/DeepCopy/Filter/Doctrine/DoctrineProxyFilter.php:10
- > PHP Notice
Undefined index: filename in wp-content/plugins/wp-book/vendor/mpdf/mpdf/data/out.php on line 5
- > PHP Fatal error
Uncaught Error: Class 'PHPUnit_Framework_TestCase' not found in wp-content/plugins/wp-book/vendor/psr/log/Psr/Log/Test/LoggerInterfaceTest.php:14
- > PHP Fatal error
Uncaught Error: Class 'Mpdf\\Tag\\Tag' not found in wp-content/plugins/wp-book/vendor/mpdf/mpdf/src/Tag/Annotation.php:5
- > PHP Fatal error
User-side errors Passed 1 test
🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There were no browser issues found
Optimizations
Plugin configuration Passed 29 tests
readme.txt Passed 16 tests
The readme.txt file uses markdown syntax to describe your plugin to the world
5 plugin tags: mpdf, download, post, pages, pdf
wp-book/wp-book.php Passed 13 tests
The main file in "WP Book" v. 1.0.0 serves as a complement to information provided in readme.txt and as the entry point to the plugin
20 characters long description:
PDF Download plugin.
Code Analysis 95% from 3 tests
File types Passed 1 test
🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
No dangerous file extensions were detected78,448 lines of code in 364 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 334 | 9,094 | 9,391 | 75,967 |
Markdown | 8 | 391 | 0 | 1,134 |
JSON | 6 | 32 | 0 | 713 |
CSS | 6 | 65 | 36 | 424 |
XML | 4 | 13 | 1 | 81 |
JavaScript | 2 | 10 | 5 | 63 |
YAML | 3 | 21 | 2 | 63 |
Bourne Shell | 1 | 2 | 0 | 3 |
PHP code 0% from 2 tests
This is a very shot review of cyclomatic complexity and code structure
Please tend to the following items
- Class cyclomatic complexity has to be reduced to less than 1000 (currently 7,628)
- Cyclomatic complexity of methods should be reduced to less than 100 (currently 460)
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.52 |
Average class complexity | 70.07 |
▷ Minimum class complexity | 1.00 |
▷ Maximum class complexity | 7,628.00 |
Average method complexity | 15.85 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 460.00 |
Code structure | ||
---|---|---|
Namespaces | 46 | |
Interfaces | 8 | |
Traits | 2 | |
Classes | 237 | |
▷ Abstract classes | 7 | 2.95% |
▷ Concrete classes | 230 | 97.05% |
▷ Final classes | 0 | 0.00% |
Methods | 1,167 | |
▷ Static methods | 85 | 7.28% |
▷ Public methods | 1,017 | 87.15% |
▷ Protected methods | 10 | 0.86% |
▷ Private methods | 140 | 12.00% |
Functions | 21 | |
▷ Named functions | 9 | 42.86% |
▷ Anonymous functions | 12 | 57.14% |
Constants | 391 | |
▷ Global constants | 5 | 1.28% |
▷ Class constants | 386 | 98.72% |
▷ Public constants | 386 | 100.00% |
Plugin size Passed 2 tests
Image compression Passed 2 tests
Often times overlooked, PNG files can occupy unnecessary space in your plugin
4 PNG files occupy 0.04MB with 0.02MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
vendor/myclabs/deep-copy/doc/clone.png | 12.09KB | 5.48KB | ▼ 54.70% |
vendor/myclabs/deep-copy/doc/deep-copy.png | 10.64KB | 5.23KB | ▼ 50.84% |
vendor/myclabs/deep-copy/doc/graph.png | 6.29KB | 3.03KB | ▼ 51.86% |
vendor/myclabs/deep-copy/doc/deep-clone.png | 13.68KB | 6.54KB | ▼ 52.22% |