Benchmarks
Plugin footprint 47% from 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed gracefully, with no errors
Server metrics [RAM: ▼0.81MB] [CPU: ▼37.05ms] Passed 4 tests
A check of server-side resources used by Word Count and Social Shares
Server-side resource usage in normal parameters
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.62 ▲0.16 | 41.27 ▼2.59 |
Dashboard /wp-admin | 3.14 ▼0.21 | 23.67 ▼40.07 |
Posts /wp-admin/edit.php | 3.14 ▼0.22 | 25.91 ▼25.15 |
Add New Post /wp-admin/post-new.php | 3.14 ▼2.75 | 25.20 ▼75.41 |
Media Library /wp-admin/upload.php | 3.14 ▼0.09 | 25.27 ▼7.55 |
Full Time report /wp-admin/admin.php?page=social_shares_full_time | 3.14 | 26.04 |
Word Count and Social Shares /wp-admin/admin.php?page=social_shares | 3.14 | 28.12 |
Options /wp-admin/admin.php?page=social_shares_config | 3.14 | 24.39 |
Download .CSV /wp-admin/admin.php?page=social_shares_csv | 3.14 | 28.83 |
Server storage [IO: ▲0.34MB] [DB: ▲0.00MB] 67% from 3 tests
How much does this plugin use your filesystem and database?
It is recommended to fix the following issues
- Illegal file modification found: 1 file (0.08KB) outside of "wp-content/plugins/word-count-and-social-shares/" and "wp-content/uploads/"
- (new file) wp-admin/cache/7505d64a54e061b7acd54ccd58b49dc43500b635.cache
Filesystem: 24 new files
Database: 1 new table, 7 new options
New tables |
---|
wp_social_shares_report |
New WordPress options |
---|
widget_recent-posts |
widget_recent-comments |
theysaidso_admin_options |
can_compress_scripts |
widget_theysaidso_widget |
db_upgraded |
social_shares_plugin_version |
Browser metrics Passed 4 tests
Word Count and Social Shares: an overview of browser usage
Minimal impact on browser resources
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,855 ▲109 | 13.63 ▼0.66 | 1.73 ▲0.05 | 43.12 ▼2.42 |
Dashboard /wp-admin | 2,249 ▲58 | 5.29 ▼0.59 | 105.70 ▼0.85 | 78.30 ▲34.56 |
Posts /wp-admin/edit.php | 2,147 ▲58 | 2.41 ▲0.41 | 40.75 ▼0.16 | 35.54 ▼0.24 |
Add New Post /wp-admin/post-new.php | 1,717 ▲189 | 22.43 ▲4.32 | 623.68 ▲20.63 | 36.17 ▼11.87 |
Media Library /wp-admin/upload.php | 1,437 ▲52 | 4.59 ▲0.38 | 97.35 ▲4.04 | 77.69 ▲37.35 |
Full Time report /wp-admin/admin.php?page=social_shares_full_time | 1,797 | 7.12 | 58.68 | 75.61 |
Word Count and Social Shares /wp-admin/admin.php?page=social_shares | 1,280 | 5.09 | 51.08 | 43.59 |
Options /wp-admin/admin.php?page=social_shares_config | 853 | 2.14 | 29.05 | 29.87 |
Download .CSV /wp-admin/admin.php?page=social_shares_csv | 825 | 2.33 | 27.50 | 26.86 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 25% 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 did not uninstall without warnings or errors
- > User deprecated in wp-includes/functions.php+5737
Function has_cap was called with an argument that is deprecated since version 2.0.0! Usage of user levels is deprecated. Use capabilities instead.
- The uninstall procedure failed, leaving 1 table in the database
- wp_social_shares_report
- This plugin does not fully uninstall, leaving 7 options in the database
- theysaidso_admin_options
- can_compress_scripts
- widget_recent-comments
- social_shares_plugin_version
- widget_theysaidso_widget
- widget_recent-posts
- db_upgraded
Smoke tests 25% from 4 tests
Server-side errors 0% from 1 test
🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Smoke test failed, please fix the following
- 44 occurences, only the last one shown
- > GET request to /wp-admin/admin.php?page=social_shares_csv
- > User deprecated in wp-includes/functions.php+5737
Function has_cap was called with an argument that is deprecated since version 2.0.0! Usage of user levels is deprecated. Use capabilities instead.
- 7 occurences, only the last one shown
- > GET request to /wp-admin/admin.php?page=social_shares_full_time
- > Warning in wp-content/plugins/word-count-and-social-shares/includes/posts.class.inc+210
Use of undefined constant word_count - assumed 'word_count' (this will throw an Error in a future version of PHP)
- 2 occurences, only the last one shown
- > GET request to /wp-admin/admin.php?page=social_shares
- > Warning in wp-content/plugins/word-count-and-social-shares/includes/posts.class.inc+285
Use of undefined constant average_words - assumed 'average_words' (this will throw an Error in a future version of PHP)
- 4 occurences, only the last one shown
- > GET request to /wp-admin/admin.php?page=social_shares_csv
- > Notice in wp-content/plugins/word-count-and-social-shares/index.php+368
Undefined index: act
- 22 occurences, only the last one shown
- > GET request to /wp-admin/admin.php?page=social_shares
- > Notice in wp-content/plugins/word-count-and-social-shares/templates/home_tpl.php+131
Undefined variable: data
- 28 occurences, only the last one shown
- > GET request to /wp-admin/admin.php?page=social_shares
- > Notice in wp-content/plugins/word-count-and-social-shares/templates/home_tpl.php+131
Trying to access array offset on value of type null
- 2 occurences, only the last one shown
- > GET request to /wp-admin/admin.php?page=social_shares
- > Notice in wp-content/plugins/word-count-and-social-shares/index.php+62
Undefined index: date_from
- > GET request to /wp-admin/admin.php?page=social_shares
- > Warning in wp-content/plugins/word-count-and-social-shares/includes/posts.class.inc+273
Division by zero
- > GET request to /wp-admin/admin.php?page=social_shares_config
- > Warning in wp-content/plugins/word-count-and-social-shares/index.php+395
Use of undefined constant save - assumed 'save' (this will throw an Error in a future version of PHP)
- > GET request to /wp-admin/admin.php?page=social_shares_csv
- > Notice in wp-content/plugins/word-count-and-social-shares/index.php+363
Undefined variable: FILE_LIST
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 items
- 1× PHP files output non-empty strings when accessed directly via GET requests:
- > /wp-content/plugins/word-count-and-social-shares/templates/csv_table_tpl.php
- 15× PHP files trigger server errors when accessed directly (only 10 are shown):
- > PHP Notice
Undefined variable: file in wp-content/plugins/word-count-and-social-shares/templates/csv_table_tpl.php on line 18
- > PHP Fatal error
Uncaught Error: Call to undefined function plugins_url() in wp-content/plugins/word-count-and-social-shares/templates/home_fulltime_tpl.php:25
- > PHP Notice
Undefined variable: file in wp-content/plugins/word-count-and-social-shares/templates/csv_table_tpl.php on line 19
- > PHP Notice
Trying to access array offset on value of type null in wp-content/plugins/word-count-and-social-shares/templates/csv_table_tpl.php on line 18
- > PHP Notice
Undefined variable: file in wp-content/plugins/word-count-and-social-shares/templates/csv_table_tpl.php on line 16
- > PHP Notice
Trying to access array offset on value of type null in wp-content/plugins/word-count-and-social-shares/templates/csv_table_tpl.php on line 16
- > PHP Notice
Trying to access array offset on value of type null in wp-content/plugins/word-count-and-social-shares/templates/csv_table_tpl.php on line 17
- > PHP Notice
Trying to access array offset on value of type null in wp-content/plugins/word-count-and-social-shares/templates/csv_table_tpl.php on line 19
- > PHP Notice
Trying to access array offset on value of type null in wp-content/plugins/word-count-and-social-shares/templates/csv_table_tpl.php on line 16
- > PHP Notice
Undefined variable: file in wp-content/plugins/word-count-and-social-shares/templates/csv_table_tpl.php on line 16
- > PHP Notice
User-side errors Passed 1 test
🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test
Optimizations
Plugin configuration 93% from 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
6 plugin tags: linkedin, social shares, google, twitter, facebook...
word-count-and-social-shares/index.php 85% from 13 tests
The main PHP file in "Word Count and Social Shares" ver. 1.0 adds more information about the plugin and also serves as the entry point for this plugin
It is important to fix the following:
- Description: The description should be shorter than 140 characters (currently 166 characters long)
- Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("word-count-and-social-shares.php" instead of "index.php")
Code Analysis Passed 3 tests
File types Passed 1 test
🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
There were no executable files found in this plugin1,534 lines of code in 12 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 8 | 356 | 141 | 1,201 |
Pascal | 1 | 24 | 109 | 158 |
JavaScript | 2 | 0 | 26 | 137 |
CSS | 1 | 1 | 0 | 38 |
PHP code Passed 2 tests
An overview of cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.14 |
Average class complexity | 0.00 |
▷ Minimum class complexity | 0.00 |
▷ Maximum class complexity | 0.00 |
Average method complexity | 0.00 |
▷ Minimum method complexity | 0.00 |
▷ Maximum method complexity | 0.00 |
Code structure | ||
---|---|---|
Namespaces | 0 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 0 | |
▷ Abstract classes | 0 | 0.00% |
▷ Concrete classes | 0 | 0.00% |
▷ Final classes | 0 | 0.00% |
Methods | 0 | |
▷ Static methods | 0 | 0.00% |
▷ Public methods | 0 | 0.00% |
▷ Protected methods | 0 | 0.00% |
▷ Private methods | 0 | 0.00% |
Functions | 16 | |
▷ Named functions | 16 | 100.00% |
▷ Anonymous functions | 0 | 0.00% |
Constants | 0 | |
▷ Global constants | 0 | 0.00% |
▷ Class constants | 0 | 0.00% |
▷ Public constants | 0 | 0.00% |
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
8 PNG files occupy 0.16MB with 0.05MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
screenshot-2.png | 59.70KB | 22.49KB | ▼ 62.33% |
templates/images/share.png | 0.88KB | 1.06KB | 0.00% |
templates/images/filetype_pdf.png | 5.79KB | 3.22KB | ▼ 44.46% |
screenshot-3.png | 33.92KB | 14.76KB | ▼ 56.47% |
templates/images/settings.png | 2.86KB | 2.75KB | ▼ 3.92% |