Benchmarks
Plugin footprint 83% from 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed gracefully, with no errors
Server metrics [RAM: ▲1.24MB] [CPU: ▲11.94ms] Passed 4 tests
Analyzing server-side resources used by ShareThis Dashboard for Google Analytics
This plugin has minimal impact on server resources
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 4.70 ▲1.23 | 57.69 ▲13.34 |
Dashboard /wp-admin | 4.56 ▲1.25 | 61.32 ▲8.82 |
Posts /wp-admin/edit.php | 4.61 ▲1.25 | 61.28 ▲13.51 |
Add New Post /wp-admin/post-new.php | 7.14 ▲1.25 | 107.36 ▲12.09 |
Media Library /wp-admin/upload.php | 4.48 ▲1.25 | 49.66 ▲15.36 |
Dashboard /wp-admin/admin.php?page=googleanalytics | 4.73 | 68.12 |
Settings /wp-admin/admin.php?page=googleanalytics/settings | 4.89 | 46.54 |
Server storage [IO: ▲12.36MB] [DB: ▲0.00MB] Passed 3 tests
Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 2,089 new files
Database: no new tables, 24 new options
New WordPress options |
---|
googleanalytics_oauth_auth_code |
googleanalytics_cache_buffer |
widget_recent-comments |
can_compress_scripts |
googleanalytics_sherethis_property_id |
googleanalytics_cache_last_time_attempt |
googleanalytics_web_property_id_manually_value |
widget_recent-posts |
theysaidso_admin_options |
googleanalytics_oauth_auth_token |
... |
Browser metrics Passed 4 tests
A check of browser resources used by ShareThis Dashboard for Google Analytics
Minimal impact on browser resources
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,845 ▲59 | 14.48 ▲0.13 | 10.18 ▲7.98 | 44.62 ▼3.15 |
Dashboard /wp-admin | 2,219 ▲45 | 5.53 ▼0.16 | 96.48 ▼0.24 | 38.97 ▼1.30 |
Posts /wp-admin/edit.php | 2,127 ▲27 | 2.03 ▲0.05 | 39.85 ▲2.63 | 37.38 ▼0.51 |
Add New Post /wp-admin/post-new.php | 1,548 ▲20 | 23.36 ▲0.15 | 662.93 ▼27.27 | 59.15 ▲7.12 |
Media Library /wp-admin/upload.php | 1,430 ▲33 | 4.19 ▲0.01 | 97.66 ▼9.08 | 44.56 ▼2.17 |
Dashboard /wp-admin/admin.php?page=googleanalytics | 853 | 2.16 | 764.20 | 50.76 |
Settings /wp-admin/admin.php?page=googleanalytics/settings | 1,131 | 2.05 | 29.61 | 53.69 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 75% 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 does not fully uninstall, leaving 7 options in the database
- widget_recent-comments
- theysaidso_admin_options
- widget_theysaidso_widget
- widget_recent-posts
- googleanalytics_fresh
- can_compress_scripts
- db_upgraded
Smoke tests 25% from 4 tests
Server-side errors Passed 1 test
🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though everything seems fine, this is not an exhaustive test
SRP 0% from 2 tests
🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please fix the following
- 1× PHP files perform the task of outputting text when accessed with GET requests:
- > /wp-content/plugins/googleanalytics/view/templates/demo-popup.php
- 1225× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
- > PHP Fatal error
Uncaught Error: Class 'Google\\Protobuf\\Internal\\Message' not found in wp-content/plugins/googleanalytics/lib/analytics-admin/vendor/google/common-protos/src/Api/Expr/V1alpha1/Type/FunctionType.php:16
- > PHP Fatal error
Uncaught Error: Class 'Google\\Protobuf\\Internal\\Message' not found in wp-content/plugins/googleanalytics/lib/analytics-admin/vendor/google/cloud/AnalyticsAdmin/src/V1alpha/LinkProposalStatusDetails.php:16
- > PHP Fatal error
Uncaught Error: Class 'Ramsey\\Collection\\AbstractArray' not found in wp-content/plugins/googleanalytics/lib/analytics-admin/vendor/ramsey/collection/src/GenericArray.php:22
- > PHP Fatal error
Uncaught Error: Class 'Google\\Protobuf\\Internal\\Message' not found in wp-content/plugins/googleanalytics/lib/analytics-admin/vendor/google/protobuf/src/Google/Protobuf/Field.php:16
- > PHP Fatal error
Uncaught Error: Class 'Google\\Protobuf\\Internal\\Message' not found in wp-content/plugins/googleanalytics/lib/analytics-admin/vendor/google/protobuf/src/Google/Protobuf/Internal/FieldDescriptorProto.php:18
- > PHP Fatal error
Uncaught Error: Class 'Google\\Protobuf\\Internal\\Message' not found in wp-content/plugins/googleanalytics/lib/analytics-admin/vendor/google/cloud/AnalyticsAdmin/src/V1alpha/ChangeHistoryChange/ChangeHistoryResource.php:17
- > PHP Fatal error
Uncaught Error: Class 'Google\\Protobuf\\Internal\\Message' not found in wp-content/plugins/googleanalytics/lib/analytics-admin/vendor/google/grpc-gcp/src/generated/Grpc/Gcp/MethodConfig.php:12
- > PHP Fatal error
Uncaught Error: Class 'Google\\Collection' not found in wp-content/plugins/googleanalytics/lib/analytics-admin/vendor/google/apiclient-services/src/Analytics/Profiles.php:20
- > PHP Fatal error
Uncaught Error: Interface 'Psr\\Http\\Message\\StreamInterface' not found in wp-content/plugins/googleanalytics/lib/analytics-admin/vendor/guzzlehttp/psr7/src/FnStream.php:16
- > PHP Fatal error
Uncaught Error: Class 'Google\\Protobuf\\Internal\\Message' not found in wp-content/plugins/googleanalytics/lib/analytics-admin/vendor/google/cloud/AnalyticsAdmin/src/V1alpha/DeletePropertyRequest.php:16
- > PHP Fatal error
User-side errors 0% from 1 test
🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Please fix the following browser errors
- > GET request to /wp-admin/admin.php?page=googleanalytics
- > Console-api (warning) in unknown
/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,underscore,wp-util&ver=6.3.1 1:28609 "jQuery.Deferred exception: Cannot read properties of undefined (reading 'top')" "TypeError: Cannot read properties of undefined (reading 'top')\n at HTMLDocument.\u003Canonymous> (/wp-content/plugins/googleanalytics/js/googleanalytics_page.js?ver=1697659237:858:35)\n at e (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,underscore,wp-util&ver=6.3.1:2:26990)\n at t (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,underscore,wp-util&ver=6.3.1:2:27292)" undefined
- > GET request to /wp-admin/admin.php?page=googleanalytics
- > Javascript (severe) in unknown
/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,underscore,wp-util&ver=6.3.1 1:28721 Uncaught TypeError: Cannot read properties of undefined (reading 'top')
Optimizations
Plugin configuration Passed 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
5 plugin tags: google analytics dashboard, analytics, google analytics widget, google analytics, google analytics plugin
googleanalytics/googleanalytics.php Passed 13 tests
Analyzing the main PHP file in "ShareThis Dashboard for Google Analytics" version 3.1.7
136 characters long description:
Use Google Analytics on your WordPress site without touching any code, and view visitor reports right in your WordPress admin dashboard!
Code Analysis 97% from 3 tests
File types Passed 1 test
🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
No dangerous file extensions were detected143,093 lines of code in 2,014 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 1,913 | 28,103 | 126,641 | 131,270 |
JSON | 50 | 0 | 0 | 5,037 |
Markdown | 20 | 1,141 | 0 | 3,785 |
JavaScript | 4 | 180 | 76 | 1,291 |
CSS | 4 | 211 | 5 | 1,136 |
C | 2 | 35 | 70 | 132 |
Python | 2 | 32 | 78 | 89 |
Bourne Shell | 5 | 25 | 33 | 75 |
Protocol Buffers | 2 | 14 | 38 | 64 |
XML | 3 | 0 | 1 | 51 |
make | 2 | 17 | 16 | 51 |
YAML | 4 | 7 | 2 | 43 |
m4 | 1 | 11 | 14 | 38 |
C/C++ Header | 1 | 10 | 18 | 25 |
SVG | 1 | 0 | 0 | 6 |
PHP code 50% from 2 tests
Cyclomatic complexity and code structure are the fingerprint of this plugin
Please tend to the following items
- Method cyclomatic complexity should be reduced to less than 100 (currently 105)
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.27 |
Average class complexity | 7.07 |
▷ Minimum class complexity | 1.00 |
▷ Maximum class complexity | 662.00 |
Average method complexity | 1.97 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 105.00 |
Code structure | ||
---|---|---|
Namespaces | 226 | |
Interfaces | 85 | |
Traits | 35 | |
Classes | 1,749 | |
▷ Abstract classes | 228 | 13.04% |
▷ Concrete classes | 1,521 | 86.96% |
▷ Final classes | 93 | 6.11% |
Methods | 11,411 | |
▷ Static methods | 1,376 | 12.06% |
▷ Public methods | 10,208 | 89.46% |
▷ Protected methods | 457 | 4.00% |
▷ Private methods | 746 | 6.54% |
Functions | 282 | |
▷ Named functions | 89 | 31.56% |
▷ Anonymous functions | 193 | 68.44% |
Constants | 1,186 | |
▷ Global constants | 23 | 1.94% |
▷ Class constants | 1,163 | 98.06% |
▷ Public constants | 1,102 | 94.75% |
Plugin size Passed 2 tests
Image compression Passed 2 tests
All PNG images should be compressed to minimize bandwidth usage for end users
3 PNG files occupy 0.33MB with 0.23MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
assets/images/demographics-ad.png | 112.74KB | 27.33KB | ▼ 75.76% |
assets/images/demographics-ex.png | 162.89KB | 37.71KB | ▼ 76.85% |
assets/images/gdpr-ex.png | 63.58KB | 26.25KB | ▼ 58.72% |