Benchmarks
Plugin footprint 83% from 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Install script ran successfully
Server metrics [RAM: ▼0.22MB] [CPU: ▼16.15ms] Passed 4 tests
An overview of server-side resources used by WPTimeToRead
Server-side resource usage in normal parameters
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.55 ▲0.09 | 40.19 ▼1.73 |
Dashboard /wp-admin | 3.48 ▲0.18 | 53.90 ▼1.76 |
Posts /wp-admin/edit.php | 3.45 ▲0.09 | 48.24 ▼3.43 |
Add New Post /wp-admin/post-new.php | 4.71 ▼1.18 | 45.39 ▼57.67 |
Media Library /wp-admin/upload.php | 3.34 ▲0.11 | 37.37 ▼1.71 |
Server storage [IO: ▲8.57MB] [DB: ▲0.00MB] Passed 3 tests
Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 2,018 new files
Database: no new tables, 7 new options
New WordPress options |
---|
can_compress_scripts |
db_upgraded |
recovery_mode_email_last_sent |
widget_recent-posts |
widget_recent-comments |
widget_theysaidso_widget |
theysaidso_admin_options |
Browser metrics Passed 4 tests
WPTimeToRead: an overview of browser usage
There were no issues detected in relation to browser resource usage
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,684 ▼102 | 14.70 ▲0.36 | 1.10 ▼0.96 | 25.11 ▼18.32 |
Dashboard /wp-admin | 2,207 ▲30 | 5.64 ▲0.07 | 87.41 ▼7.31 | 40.72 ▼6.72 |
Posts /wp-admin/edit.php | 1,228 ▼875 | 1.51 ▼0.47 | 6.87 ▼32.90 | 28.09 ▼7.33 |
Add New Post /wp-admin/post-new.php | 45 ▼1,490 | 0.42 ▼18.08 | 0.10 ▼668.30 | 12.50 ▼67.60 |
Media Library /wp-admin/upload.php | 1,401 ▼2 | 4.19 ▲0.03 | 96.96 ▼9.18 | 58.47 ▲10.23 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 75% from 4 tests
🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
It is recommended to fix the following
- This plugin does not fully uninstall, leaving 7 options in the database
- recovery_mode_email_last_sent
- widget_recent-posts
- widget_recent-comments
- db_upgraded
- widget_theysaidso_widget
- theysaidso_admin_options
- can_compress_scripts
Smoke tests 50% from 4 tests
Server-side errors Passed 1 test
🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Good news, no errors were detected
SRP 0% 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
- 2× PHP files perform the action of outputting non-empty strings when accessed directly:
- > /wp-content/plugins/wptimetoread/vendor/kdaviesnz/timetoread/vendor/phpunit/phpunit/tests/TextUI/_files/phpt_external.php
- > /wp-content/plugins/wptimetoread/vendor/kdaviesnz/timetoread/vendor/squizlabs/php_codesniffer/scripts/build-phar.php
- 940× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
- > PHP Fatal error
Uncaught Error: Class 'PHPUnit\\Framework\\TestCase' not found in wp-content/plugins/wptimetoread/vendor/kdaviesnz/timetoread/vendor/phpunit/phpunit/tests/Framework/Constraint/ExceptionMessageTest.php:15
- > PHP Fatal error
Uncaught Error: Class 'PHPUnit\\Framework\\TestCase' not found in wp-content/plugins/wptimetoread/vendor/kdaviesnz/timetoread/vendor/phpunit/php-code-coverage/tests/_files/CoveragePrivateTest.php:4
- > PHP Fatal error
Uncaught Error: Interface 'PHP_CodeSniffer_Sniff' not found in wp-content/plugins/wptimetoread/vendor/kdaviesnz/timetoread/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/PEAR/Sniffs/Functions/FunctionCallSignatureSniff.php:28
- > PHP Fatal error
Uncaught Error: Class 'PHPUnit\\Framework\\TestCase' not found in wp-content/plugins/wptimetoread/vendor/kdaviesnz/timetoread/vendor/phpunit/phpunit/tests/_files/OneTestCase.php:4
- > PHP Fatal error
require(): Failed opening required 'wp-content/plugins/wptimetoread/vendor/kdaviesnz/timetoread/vendor/phar-io/manifest/examples/../vendor/autoload.php' (include_path='.:/usr/share/php') in wp-content/plugins/wptimetoread/vendor/kdaviesnz/timetoread/vendor/phar-io/manifest/examples/example-01.php on line 14
- > PHP Fatal error
Uncaught Error: Interface 'PHP_CodeSniffer_Sniff' not found in wp-content/plugins/wptimetoread/vendor/kdaviesnz/timetoread/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/Debug/JSHintSniff.php:30
- > PHP Fatal error
Uncaught Error: Interface 'PharIo\\Manifest\\Exception' not found in wp-content/plugins/wptimetoread/vendor/kdaviesnz/timetoread/vendor/phar-io/manifest/src/exceptions/ManifestElementException.php:5
- > PHP Fatal error
Uncaught Error: Class 'PHPUnit\\Framework\\TestCase' not found in wp-content/plugins/wptimetoread/vendor/kdaviesnz/timetoread/vendor/phpunit/php-token-stream/tests/Token/NamespaceTest.php:13
- > PHP Fatal error
Uncaught Error: Interface 'PHP_CodeSniffer_Sniff' not found in wp-content/plugins/wptimetoread/vendor/kdaviesnz/timetoread/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/PHP/DisallowInlineIfSniff.php:30
- > PHP Fatal error
Uncaught Error: Class 'PHPUnit\\Framework\\TestCase' not found in wp-content/plugins/wptimetoread/vendor/kdaviesnz/timetoread/vendor/phpunit/phpunit/tests/Regression/Trac/783/OneTest.php:7
- > 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 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
2 plugin tags: wptimetoread, reading time
wptimetoread/wptimetoread.php Passed 13 tests
The entry point to "WPTimeToRead" version 1.0.0 is a PHP file that has certain tags in its header comment area
109 characters long description:
Displays in minutes the time to read a post or page based not only on the number of words but the difficulty.
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
Please fix the following items
- You should never include executable (binary) or otherwise dangerous files in your plugin
- .bat - Batch File in Windows
- ☣ wp-content/plugins/wptimetoread/vendor/kdaviesnz/timetoread/vendor/squizlabs/php_codesniffer/scripts/phpcbf.bat
- ☣ wp-content/plugins/wptimetoread/vendor/kdaviesnz/timetoread/vendor/squizlabs/php_codesniffer/scripts/phpcs.bat
- .bat - Batch File in Windows
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 1,458 | 22,459 | 43,784 | 109,445 |
XML | 184 | 188 | 137 | 5,969 |
Markdown | 82 | 1,905 | 0 | 3,472 |
JSON | 38 | 18 | 0 | 3,045 |
HTML | 9 | 112 | 36 | 1,699 |
Ant | 17 | 125 | 0 | 718 |
YAML | 21 | 131 | 0 | 528 |
SVG | 1 | 0 | 0 | 288 |
XSD | 1 | 0 | 0 | 269 |
JavaScript | 8 | 57 | 146 | 225 |
CSS | 4 | 26 | 5 | 101 |
DOS Batch | 2 | 2 | 22 | 16 |
Bourne Shell | 1 | 0 | 0 | 14 |
PHP code 50% from 2 tests
This is a very shot review of cyclomatic complexity and code structure
Please tend to the following items
- Method cyclomatic complexity has to be reduced to less than 100 (currently 270)
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.21 |
Average class complexity | 8.19 |
▷ Minimum class complexity | 1.00 |
▷ Maximum class complexity | 542.00 |
Average method complexity | 2.94 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 270.00 |
Code structure | ||
---|---|---|
Namespaces | 103 | |
Interfaces | 89 | |
Traits | 5 | |
Classes | 1,392 | |
▷ Abstract classes | 35 | 2.51% |
▷ Concrete classes | 1,357 | 97.49% |
▷ Final classes | 77 | 5.67% |
Methods | 5,596 | |
▷ Static methods | 542 | 9.69% |
▷ Public methods | 4,737 | 84.65% |
▷ Protected methods | 487 | 8.70% |
▷ Private methods | 372 | 6.65% |
Functions | 238 | |
▷ Named functions | 161 | 67.65% |
▷ Anonymous functions | 77 | 32.35% |
Constants | 189 | |
▷ Global constants | 102 | 53.97% |
▷ Class constants | 87 | 46.03% |
▷ Public constants | 87 | 100.00% |
Plugin size Passed 2 tests
Image compression Passed 2 tests
All PNG images should be compressed to minimize bandwidth usage for end users
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/kdaviesnz/timetoread/vendor/myclabs/deep-copy/doc/graph.png | 6.29KB | 3.03KB | ▼ 51.86% |
vendor/kdaviesnz/timetoread/vendor/myclabs/deep-copy/doc/deep-copy.png | 10.64KB | 5.23KB | ▼ 50.84% |
vendor/kdaviesnz/timetoread/vendor/myclabs/deep-copy/doc/deep-clone.png | 13.68KB | 6.54KB | ▼ 52.22% |
vendor/kdaviesnz/timetoread/vendor/myclabs/deep-copy/doc/clone.png | 12.09KB | 5.48KB | ▼ 54.70% |