Benchmarks
Plugin footprint 83% from 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | The install procedure must perform silently
Install script ran successfully
Server metrics [RAM: ▲0.17MB] [CPU: ▼0.48ms] Passed 4 tests
An overview of server-side resources used by Show Google Analytics widget
No issues were detected with server-side resource usage
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.63 ▲0.17 | 46.43 ▲4.67 |
Dashboard /wp-admin | 3.47 ▲0.17 | 51.32 ▼1.42 |
Posts /wp-admin/edit.php | 3.58 ▲0.23 | 57.85 ▲5.81 |
Add New Post /wp-admin/post-new.php | 6.05 ▲0.16 | 91.66 ▼8.81 |
Media Library /wp-admin/upload.php | 3.39 ▲0.16 | 40.86 ▲3.65 |
設定 GA 帳號及參數 /wp-admin/options-general.php?page=sig-ga-account | 3.38 | 33.61 |
Server storage [IO: ▲0.23MB] [DB: ▲0.00MB] Passed 3 tests
Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 19 new files
Database: no new tables, 8 new options
New WordPress options |
---|
widget_recent-posts |
db_upgraded |
widget_sig-show-hot |
widget_theysaidso_widget |
can_compress_scripts |
widget_sig-show-pageview |
theysaidso_admin_options |
widget_recent-comments |
Browser metrics Passed 4 tests
Show Google Analytics widget: an overview of browser usage
This plugin has a minimal impact on browser resources
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,860 ▲99 | 13.21 ▼0.05 | 2.15 ▼2.37 | 47.31 ▲1.66 |
Dashboard /wp-admin | 2,238 ▲35 | 5.80 ▲0.90 | 106.32 ▼1.26 | 46.31 ▲0.91 |
Posts /wp-admin/edit.php | 2,120 ▲20 | 2.04 ▼0.00 | 40.64 ▲3.49 | 45.68 ▲5.16 |
Add New Post /wp-admin/post-new.php | 1,561 ▲35 | 23.42 ▲5.67 | 634.35 ▼70.86 | 65.98 ▲6.72 |
Media Library /wp-admin/upload.php | 1,423 ▲20 | 4.19 ▼0.17 | 94.68 ▼23.11 | 51.72 ▲3.71 |
設定 GA 帳號及參數 /wp-admin/options-general.php?page=sig-ga-account | 985 | 2.05 | 26.16 | 93.38 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 75% from 4 tests
🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
- This plugin did not uninstall successfully, leaving 7 options in the database
- db_upgraded
- can_compress_scripts
- widget_recent-comments
- widget_sig-show-hot
- widget_recent-posts
- theysaidso_admin_options
- widget_theysaidso_widget
Smoke tests 75% from 4 tests
Server-side errors Passed 1 test
🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Good news, no errors were detected
SRP 50% from 2 tests
🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please take a closer look at the following
- 2× PHP files trigger server-side errors or warnings when accessed directly:
- > PHP Fatal error
Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/show-google-analytics-widget/class-ga-widget.php:6
- > PHP Fatal error
Uncaught Error: Call to undefined function load_plugin_textdomain() in wp-content/plugins/show-google-analytics-widget/wp-ga-count.php:23
- > 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 93% from 29 tests
readme.txt 94% from 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
Attributes that need to be fixed:
- Plugin Name: Please specify the plugin name on the first line (
=== show-google-analytics-widget ===
)
show-google-analytics-widget/wp-ga-count.php 92% from 13 tests
"Show Google Analytics widget" version 1.5.4's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
Please make the necessary changes and fix the following:
- Main file name: Name the main plugin file the same as the plugin slug ("show-google-analytics-widget.php" instead of "wp-ga-count.php")
Code Analysis Passed 3 tests
File types Passed 1 test
🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Good job! No executable or dangerous file extensions detected1,343 lines of code in 15 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 10 | 350 | 329 | 1,326 |
HTML | 1 | 2 | 0 | 9 |
JavaScript | 2 | 1 | 13 | 5 |
CSS | 2 | 0 | 6 | 3 |
PHP code Passed 2 tests
A brief analysis of cyclomatic complexity and code structure for this plugin
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.51 |
Average class complexity | 24.33 |
▷ Minimum class complexity | 4.00 |
▷ Maximum class complexity | 89.00 |
Average method complexity | 3.96 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 23.00 |
Code structure | ||
---|---|---|
Namespaces | 0 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 9 | |
▷ Abstract classes | 0 | 0.00% |
▷ Concrete classes | 9 | 100.00% |
▷ Final classes | 0 | 0.00% |
Methods | 69 | |
▷ Static methods | 7 | 10.14% |
▷ Public methods | 59 | 85.51% |
▷ Protected methods | 3 | 4.35% |
▷ Private methods | 7 | 10.14% |
Functions | 1 | |
▷ Named functions | 0 | 0.00% |
▷ Anonymous functions | 1 | 100.00% |
Constants | 18 | |
▷ Global constants | 7 | 38.89% |
▷ Class constants | 11 | 61.11% |
▷ Public constants | 11 | 100.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
No PNG images were found in this plugin