Benchmarks
Plugin footprint 83% from 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed successfully, without throwing any errors or notices
Server metrics [RAM: ▲0.35MB] [CPU: ▲2.16ms] Passed 4 tests
This is a short check of server-side resources used by Koko Analytics
Server-side resource usage in normal parameters
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.83 ▲0.37 | 39.97 ▼1.03 |
Dashboard /wp-admin | 3.71 ▲0.41 | 53.94 ▲3.15 |
Posts /wp-admin/edit.php | 3.74 ▲0.38 | 52.60 ▲4.99 |
Add New Post /wp-admin/post-new.php | 6.23 ▲0.34 | 89.22 ▲3.18 |
Media Library /wp-admin/upload.php | 3.55 ▲0.32 | 39.22 ▲3.34 |
Server storage [IO: ▲0.86MB] [DB: ▲0.53MB] Passed 3 tests
A short overview of filesystem and database impact
The plugin installed successfully
Filesystem: 73 new files
Database: 5 new tables, 10 new options
New tables |
---|
wp_koko_analytics_referrer_stats |
wp_koko_analytics_post_stats |
wp_koko_analytics_referrer_urls |
wp_koko_analytics_dates |
wp_koko_analytics_site_stats |
New WordPress options |
---|
widget_recent-comments |
widget_koko-analytics-most-viewed-posts |
theysaidso_admin_options |
koko_analytics_version |
can_compress_scripts |
db_upgraded |
widget_recent-posts |
widget_theysaidso_widget |
koko_analytics_use_custom_endpoint |
activate_plugins |
Browser metrics Passed 4 tests
An overview of browser requirements for Koko Analytics
This plugin renders optimally with no browser resource issues detected
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 3,038 ▲302 | 14.81 ▲0.10 | 3.77 ▲2.09 | 37.47 ▼7.12 |
Dashboard /wp-admin | 2,402 ▲225 | 5.77 ▲0.13 | 113.73 ▲17.78 | 44.77 ▼1.39 |
Posts /wp-admin/edit.php | 2,107 ▲7 | 2.03 ▲0.02 | 37.39 ▲0.24 | 35.00 ▲4.26 |
Add New Post /wp-admin/post-new.php | 1,529 ▲3 | 23.37 ▼0.21 | 659.71 ▲48.89 | 62.83 ▲5.26 |
Media Library /wp-admin/upload.php | 1,407 ▲4 | 4.18 ▲0.03 | 96.51 ▼0.89 | 40.83 ▼4.85 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 75% from 4 tests
🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
- This plugin does not fully uninstall, leaving 8 options in the database
- can_compress_scripts
- widget_koko-analytics-most-viewed-posts
- widget_theysaidso_widget
- activate_plugins
- db_upgraded
- widget_recent-comments
- widget_recent-posts
- theysaidso_admin_options
Smoke tests 75% from 4 tests
Server-side errors Passed 1 test
🔹 Test weight: 20 | This is a shallow check for server-side errors
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 fix the following items
- 4× PHP files trigger errors when accessed directly with GET requests:
- > PHP Fatal error
Uncaught Error: Call to undefined function update_option() in wp-content/plugins/koko-analytics/migrations/1.0.21-unlink-custom-endpoint-and-update-option.php:10
- > PHP Fatal error
Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/koko-analytics/src/class-widget-most-viewed-posts.php:13
- > PHP Fatal error
Uncaught Error: Call to undefined function KokoAnalytics\\is_admin() in wp-content/plugins/koko-analytics/koko-analytics.php:49
- > PHP Fatal error
Uncaught Error: Call to undefined function current_user_can() in wp-content/plugins/koko-analytics/src/views/nav.php:6
- > PHP Fatal error
User-side errors Passed 1 test
🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser issues were found
Optimizations
Plugin configuration Passed 29 tests
readme.txt Passed 16 tests
It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
5 plugin tags: statistics, stats, analytics, pageviews, privacy
koko-analytics/koko-analytics.php Passed 13 tests
"Koko Analytics" version 1.3.4's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
51 characters long description:
Privacy-friendly analytics for your WordPress site.
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
Everything looks great! No dangerous files found in this plugin3,517 lines of code in 54 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 47 | 557 | 836 | 2,807 |
CSS | 1 | 15 | 9 | 400 |
Markdown | 1 | 156 | 0 | 305 |
JavaScript | 4 | 0 | 1 | 4 |
SVG | 1 | 0 | 0 | 1 |
PHP code Passed 2 tests
A brief analysis of cyclomatic complexity and code structure for this plugin
Everything seems fine, there were no complexity issues found
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.32 |
Average class complexity | 13.60 |
▷ Minimum class complexity | 1.00 |
▷ Maximum class complexity | 48.00 |
Average method complexity | 2.89 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 18.00 |
Code structure | ||
---|---|---|
Namespaces | 3 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 20 | |
▷ Abstract classes | 0 | 0.00% |
▷ Concrete classes | 20 | 100.00% |
▷ Final classes | 0 | 0.00% |
Methods | 132 | |
▷ Static methods | 19 | 14.39% |
▷ Public methods | 114 | 86.36% |
▷ Protected methods | 1 | 0.76% |
▷ Private methods | 17 | 12.88% |
Functions | 29 | |
▷ Named functions | 18 | 62.07% |
▷ Anonymous functions | 11 | 37.93% |
Constants | 4 | |
▷ Global constants | 3 | 75.00% |
▷ Class constants | 1 | 25.00% |
▷ Public constants | 0 | 0.00% |
Plugin size 50% from 2 tests
Image compression 50% from 2 tests
Using a strong compression for your PNG files is a great way to speed-up your plugin
12 PNG files occupy 0.55MB with 0.32MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
assets/dist/img/banner-1544x500.png | 29.50KB | 11.66KB | ▼ 60.49% |
assets/dist/img/icon-256x256.png | 7.02KB | 3.29KB | ▼ 53.17% |
assets/dist/img/screenshot-3.png | 95.91KB | 25.30KB | ▼ 73.62% |
assets/dist/img/icon-128x128.png | 3.49KB | 2.24KB | ▼ 35.81% |
assets/dist/img/icon-512.png | 16.14KB | 5.93KB | ▼ 63.28% |