Benchmarks
Plugin footprint Passed 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Install script ran successfully
Server metrics [RAM: ▲0.03MB] [CPU: ▼297.01ms] 75% from 4 tests
This is a short check of server-side resources used by WCC Google Analytics
It is recommended to improve the following
- CPU: Total CPU usage must kept under 500.00ms (currently 634.15ms on /wp-admin/admin.php?page=wcc-google-analytics-setting)
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.56 ▲0.05 | 54.47 ▲4.61 |
Dashboard /wp-admin | 3.46 ▲0.06 | 33.50 ▼2.24 |
Posts /wp-admin/edit.php | 3.69 ▲0.05 | 36.80 ▼1.56 |
Add New Post /wp-admin/post-new.php | 6.93 ▼0.04 | 92.09 ▼1,183.41 |
Media Library /wp-admin/upload.php | 3.34 ▲0.05 | 24.36 ▼0.83 |
WCC Google Analytics /wp-admin/admin.php?page=wcc-google-analytics | 3.33 | 601.32 |
Setting /wp-admin/admin.php?page=wcc-google-analytics-setting | 3.33 | 634.15 |
Server storage [IO: ▲0.58MB] [DB: ▲0.00MB] Passed 3 tests
Filesystem and database footprint
This plugin installed successfully
Filesystem: 51 new files
Database: no new tables, 1 new option
New WordPress options |
---|
google_analytics_db_version |
Browser metrics Passed 4 tests
WCC Google Analytics: 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 / | 3,817 ▲75 | 15.98 ▲0.44 | 5.78 ▼0.38 | 2.15 ▼0.33 |
Dashboard /wp-admin | 2,926 ▲65 | 6.12 ▼0.01 | 116.54 ▼14.43 | 156.89 ▼6.35 |
Posts /wp-admin/edit.php | 2,719 ▲25 | 3.23 ▼0.01 | 69.14 ▲4.87 | 149.58 ▲2.24 |
Add New Post /wp-admin/post-new.php | 1,690 ▲29 | 19.49 ▲3.41 | 405.23 ▼21.78 | 157.05 ▼0.31 |
Media Library /wp-admin/upload.php | 1,732 ▲37 | 5.46 ▼0.04 | 142.46 ▼3.32 | 187.59 ▼2.72 |
WCC Google Analytics /wp-admin/admin.php?page=wcc-google-analytics | 1,092 | 2.75 | 56.52 | 153.09 |
Setting /wp-admin/admin.php?page=wcc-google-analytics-setting | 1,127 | 2.76 | 60.39 | 152.89 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests
🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The plugin uninstalled completely, with no zombie files or tables
Smoke tests 75% from 4 tests
Server-side errors Passed 1 test
🔹 Test weight: 20 | A smoke test targeting server-side errors
Everything seems fine, however this is by no means an exhaustive test
SRP 50% 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 take a closer look at the following
- 6× GET requests to PHP files have triggered server-side errors or warnings:
- > PHP Fatal error
Uncaught Error: Call to undefined function get_option() in wp-content/plugins/wcc-google-analytics/includes/dashboard.php:1
- > PHP Fatal error
Uncaught Error: Call to undefined function esc_html() in wp-content/plugins/wcc-google-analytics/includes/analytics.php:28
- > PHP Fatal error
Uncaught Error: Call to undefined function esc_url() in wp-content/plugins/wcc-google-analytics/includes/getApiKey.php:10
- > PHP Fatal error
Uncaught Error: Call to undefined function esc_url() in wp-content/plugins/wcc-google-analytics/includes/api_key_success.php:10
- > PHP Fatal error
Uncaught Error: Call to undefined function get_option() in wp-content/plugins/wcc-google-analytics/includes/setting.php:16
- > PHP Fatal error
Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/wcc-google-analytics/wcc_google_analytics.php:10
- > PHP Fatal error
User-side errors Passed 1 test
🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Everything seems fine, but this is not an exhaustive test
Optimizations
Plugin configuration 96% from 29 tests
readme.txt Passed 16 tests
The readme.txt file uses markdown syntax to describe your plugin to the world
1 plugin tags: wcc google analytics
wcc-google-analytics/wcc_google_analytics.php 92% from 13 tests
The main PHP file in "WCC Google Analytics" ver. 1.0.0 adds more information about the plugin and also serves as the entry point for this plugin
It is important to fix the following:
- Main file name: Please rename the main PHP file in this plugin to the plugin slug ("wcc-google-analytics.php" instead of "wcc_google_analytics.php")
Code Analysis Passed 3 tests
File types Passed 1 test
🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Good job! No executable or dangerous file extensions detected4,320 lines of code in 43 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
JavaScript | 2 | 309 | 141 | 1,210 |
SVG | 33 | 3 | 12 | 1,108 |
PHP | 6 | 83 | 46 | 1,079 |
CSS | 2 | 73 | 19 | 923 |
PHP code Passed 2 tests
Analyzing 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.52 |
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 | 12 | |
▷ Named functions | 12 | 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 50% from 2 tests
Image compression 50% from 2 tests
PNG files should be compressed to save space and minimize bandwidth usage
6 PNG files occupy 0.25MB with 0.12MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
img/logo.png | 73.47KB | 24.51KB | ▼ 66.64% |
(invalid) img/placeholder-2.png | 37.42KB | 0.00KB | ▼ 100.00% |
img/placeholder-1.png | 131.37KB | 131.60KB | 0.00% |
img/star.png | 0.50KB | 0.41KB | ▼ 17.58% |
img/placeholder-3.png | 3.68KB | 1.60KB | ▼ 56.48% |