Benchmarks
Plugin footprint 65% from 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed successfully, without throwing any errors or notices
Server metrics [RAM: ▲5.30MB] [CPU: ▼20.40ms] 75% from 4 tests
A check of server-side resources used by Word Count Analysis
It is recommended to improve the following
- Extra RAM: Try to keep extra memory usage under 5MB (currently 5.30MB on /wp-admin/admin.php?page=word-count-analysis)
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 9.29 ▲5.83 | 35.09 ▼9.19 |
Dashboard /wp-admin | 9.31 ▲6.00 | 40.59 ▼8.07 |
Posts /wp-admin/edit.php | 9.31 ▲5.95 | 40.58 ▼8.46 |
Add New Post /wp-admin/post-new.php | 9.31 ▲3.42 | 38.86 ▼55.88 |
Media Library /wp-admin/upload.php | 9.31 ▲6.08 | 37.64 ▲4.45 |
Freemius Debug [v.2.5.3] /wp-admin/admin.php?page=freemius | 9.31 | 33.66 |
Word Count & Analysis /wp-admin/admin.php?page=word-count-analysis | 9.31 | 35.44 |
Server storage [IO: ▲3.84MB] [DB: ▲0.00MB] Passed 3 tests
Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 268 new files
Database: 1 new table, 11 new options
New tables |
---|
wp_wca_posts |
New WordPress options |
---|
fs_accounts |
fs_gdpr |
fs_debug_mode |
widget_recent-comments |
widget_theysaidso_widget |
widget_recent-posts |
db_upgraded |
wca_version |
can_compress_scripts |
fs_active_plugins |
... |
Browser metrics Passed 4 tests
Checking browser requirements for Word Count Analysis
This plugin renders optimally with no browser resource issues detected
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 3,010 ▲275 | 13.56 ▼1.02 | 4.82 ▲2.72 | 26.48 ▼24.12 |
Dashboard /wp-admin | 2,324 ▲133 | 5.86 ▲0.99 | 104.28 ▼0.16 | 43.97 ▼1.41 |
Posts /wp-admin/edit.php | 2,160 ▲71 | 2.04 ▲0.00 | 42.07 ▼0.18 | 37.59 ▲1.58 |
Add New Post /wp-admin/post-new.php | 1,541 ▲5 | 22.98 ▼0.25 | 683.65 ▲0.04 | 64.21 ▲4.07 |
Media Library /wp-admin/upload.php | 1,443 ▲55 | 4.22 ▲0.04 | 101.58 ▼10.18 | 45.50 ▼7.17 |
Freemius Debug [v.2.5.3] /wp-admin/admin.php?page=freemius | 1,099 | 1.72 | 30.94 | 29.39 |
Word Count & Analysis /wp-admin/admin.php?page=word-count-analysis | 1,001 | 1.73 | 28.11 | 58.84 |
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
It is recommended to fix the following
- The plugin did not uninstall gracefully
- > User notice in wp-includes/functions.php+5905
Function wp_enqueue_script was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the ajax-script handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
- This plugin does not fully uninstall, leaving 10 options in the database
- widget_recent-comments
- theysaidso_admin_options
- db_upgraded
- widget_theysaidso_widget
- widget_recent-posts
- fs_gdpr
- fs_active_plugins
- can_compress_scripts
- fs_accounts
- fs_debug_mode
Smoke tests 25% from 4 tests
Server-side errors 0% from 1 test
🔹 Test weight: 20 | A smoke test targeting server-side errors
Smoke test failed, please fix the following
- 2 occurences, only the last one shown
- > GET request to /wp-admin/admin.php?page=word-count-analysis
- > User notice in wp-includes/functions.php+5905
Function wp_enqueue_script was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the ajax-script handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
SRP 0% 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
Please fix the following items
- 2× PHP files output non-empty strings when accessed directly via GET requests:
- > /wp-content/plugins/word-count-analysis/templates/footer.php
- > /wp-content/plugins/word-count-analysis/plugin.php
- 14× PHP files trigger server errors when accessed directly (only 10 are shown):
- > PHP Fatal error
Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/word-count-analysis/wca_hook.php:4
- > PHP Fatal error
Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/word-count-analysis/word-count-analysis.php:28
- > PHP Warning
include_once(WCA_LIBSStopWords.php): failed to open stream: No such file or directory in wp-content/plugins/word-count-analysis/libs/words.php on line 2
- > PHP Warning
Use of undefined constant WCA_LIBS - assumed 'WCA_LIBS' (this will throw an Error in a future version of PHP) in wp-content/plugins/word-count-analysis/libs/words.php on line 2
- > PHP Fatal error
Uncaught Error: Call to undefined function do_action() in wp-content/plugins/word-count-analysis/templates/tab-authors.php:1
- > PHP Warning
include_once(): Failed opening 'WCA_LIBSStopWords.php' for inclusion (include_path='.:/usr/share/php') in wp-content/plugins/word-count-analysis/libs/words.php on line 2
- > PHP Fatal error
Uncaught Error: Class 'PHPUnit_Framework_TestCase' not found in wp-content/plugins/word-count-analysis/vendor/vanderlee/php-sentence/tests/SentenceTest.php:7
- > PHP Fatal error
Uncaught Error: Call to undefined function do_action() in wp-content/plugins/word-count-analysis/templates/tab-posts.php:1
- > PHP Fatal error
Uncaught Error: Call to undefined function do_action() in wp-content/plugins/word-count-analysis/templates/tab-dashboard.php:1
- > PHP Fatal error
Uncaught Error: Using $this when not in object context in wp-content/plugins/word-count-analysis/templates/header.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 86% from 29 tests
readme.txt 94% from 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
Please fix the following attributes:
- Screenshots: A description for screenshot #5 is required in word-count-analysis/assets to your readme.txt
word-count-analysis/word-count-analysis.php 77% from 13 tests
The entry point to "Word Count Analysis" version 1.0.11 is a PHP file that has certain tags in its header comment area
You should first fix the following items:
- Requires PHP: Required version must match the one declared in readme.txt ("7.0" instead of "7.4")
- Description: Keep the plugin description shorter than 140 characters (currently 148 characters long)
- Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug
Code Analysis 97% from 3 tests
File types Passed 1 test
🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
No dangerous file extensions were detected39,502 lines of code in 189 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 147 | 8,458 | 17,811 | 34,976 |
HTML | 9 | 556 | 4 | 1,617 |
JavaScript | 8 | 185 | 211 | 1,478 |
CSS | 17 | 259 | 166 | 1,005 |
Markdown | 2 | 95 | 0 | 282 |
JSON | 3 | 0 | 0 | 97 |
YAML | 2 | 4 | 0 | 31 |
XML | 1 | 1 | 0 | 16 |
PHP code 50% from 2 tests
An overview of cyclomatic complexity and code structure
The following items need your attention
- Class cyclomatic complexity should be reduced to less than 1000 (currently 3,089)
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.61 |
Average class complexity | 76.85 |
▷ Minimum class complexity | 1.00 |
▷ Maximum class complexity | 3,089.00 |
Average method complexity | 4.41 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 94.00 |
Code structure | ||
---|---|---|
Namespaces | 4 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 60 | |
▷ Abstract classes | 2 | 3.33% |
▷ Concrete classes | 58 | 96.67% |
▷ Final classes | 0 | 0.00% |
Methods | 1,366 | |
▷ Static methods | 221 | 16.18% |
▷ Public methods | 958 | 70.13% |
▷ Protected methods | 18 | 1.32% |
▷ Private methods | 390 | 28.55% |
Functions | 107 | |
▷ Named functions | 100 | 93.46% |
▷ Anonymous functions | 7 | 6.54% |
Constants | 151 | |
▷ Global constants | 103 | 68.21% |
▷ Class constants | 48 | 31.79% |
▷ Public constants | 48 | 100.00% |
Plugin size Passed 2 tests
Image compression Passed 2 tests
It is recommended to compress PNG files in your plugin to minimize bandwidth usage
12 PNG files occupy 0.03MB with 0.01MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
freemius/assets/img/plugin-icon.png | 9.16KB | 5.26KB | ▼ 42.58% |
vendor/vanderlee/php-sentence/doc/resources/sort.png | 0.17KB | 0.12KB | ▼ 30.41% |
vendor/vanderlee/php-sentence/doc/resources/collapsed.png | 0.23KB | 0.14KB | ▼ 39.08% |
vendor/vanderlee/php-sentence/doc/resources/tree-last.png | 0.17KB | 0.11KB | ▼ 36.05% |
vendor/vanderlee/php-sentence/doc/resources/inherit.png | 0.15KB | 0.10KB | ▼ 29.61% |