Benchmarks
Plugin footprint 83% from 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed successfully, without throwing any errors or notices
Server metrics [RAM: ▲0.19MB] [CPU: ▼5.84ms] Passed 4 tests
Analyzing server-side resources used by Analytics for WordPress — by Segment
No issues were detected with server-side resource usage
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.67 ▲0.21 | 39.71 ▼4.04 |
Dashboard /wp-admin | 3.50 ▲0.15 | 46.03 ▼10.72 |
Posts /wp-admin/edit.php | 3.61 ▲0.25 | 49.89 ▲1.36 |
Add New Post /wp-admin/post-new.php | 6.08 ▲0.19 | 89.12 ▼9.97 |
Media Library /wp-admin/upload.php | 3.42 ▲0.19 | 36.28 ▲3.51 |
Analytics /wp-admin/options-general.php?page=analytics | 3.39 | 36.89 |
Server storage [IO: ▲0.11MB] [DB: ▲0.00MB] Passed 3 tests
Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 31 new files
Database: no new tables, 7 new options
New WordPress options |
---|
widget_theysaidso_widget |
analytics_wordpress_options |
can_compress_scripts |
widget_recent-comments |
db_upgraded |
widget_recent-posts |
theysaidso_admin_options |
Browser metrics Passed 4 tests
This is an overview of browser requirements for Analytics for WordPress — by Segment
There were no issues detected in relation to browser resource usage
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,805 ▲59 | 14.26 ▼0.30 | 2.20 ▲0.52 | 43.82 ▲4.32 |
Dashboard /wp-admin | 2,208 ▲44 | 5.62 ▲0.00 | 92.12 ▼6.80 | 41.61 ▲0.18 |
Posts /wp-admin/edit.php | 2,113 ▲10 | 1.98 ▼0.05 | 41.87 ▼0.26 | 35.72 ▼0.64 |
Add New Post /wp-admin/post-new.php | 1,534 ▲8 | 23.55 ▲0.46 | 615.92 ▼49.49 | 51.83 ▼2.22 |
Media Library /wp-admin/upload.php | 1,407 ▲10 | 4.13 ▼0.09 | 106.03 ▼6.88 | 41.89 ▼4.86 |
Analytics /wp-admin/options-general.php?page=analytics | 1,000 | 2.17 | 24.13 | 28.51 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 75% from 4 tests
🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
- The uninstall procedure has failed, leaving 6 options in the database
- theysaidso_admin_options
- widget_recent-posts
- can_compress_scripts
- widget_recent-comments
- db_upgraded
- widget_theysaidso_widget
Smoke tests 50% from 4 tests
Server-side errors Passed 1 test
🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though everything seems fine, this is not an exhaustive test
SRP 50% from 2 tests
🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
The following issues need your attention
- 21× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
- > PHP Fatal error
Uncaught Error: Class 'Segment_IO_Analytics_WordPress' not found in wp-content/plugins/segmentio/class.analytics-wordpress.php:4
- > PHP Fatal error
Uncaught Error: Class 'Segment_Analytics' not found in wp-content/plugins/segmentio/includes/class.analytics.php:8
- > PHP Fatal error
Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/segmentio/analytics-wordpress.php:1112
- > PHP Fatal error
Uncaught Error: Class 'Segment_IO_Analytics' not found in wp-content/plugins/segmentio/class.analytics.php:4
- > PHP Warning
require_once(/tmp/wordpress-tests-lib/includes/functions.php): failed to open stream: No such file or directory in wp-content/plugins/segmentio/tests/bootstrap.php on line 9
- > PHP Fatal error
Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/segmentio/integrations/intercom.php:28
- > PHP Fatal error
Uncaught Error: Call to undefined function add_action() in wp-content/plugins/segmentio/includes/class.segment-cookie.php:74
- > PHP Fatal error
require_once(): Failed opening required '/tmp/wordpress-tests-lib/includes/functions.php' (include_path='.:/usr/share/php') in wp-content/plugins/segmentio/tests/bootstrap.php on line 9
- > PHP Fatal error
Uncaught Error: Class 'WP_UnitTestCase' not found in wp-content/plugins/segmentio/tests/test-segment-settings.php:2
- > PHP Fatal error
Uncaught Error: Call to undefined function _e() in wp-content/plugins/segmentio/templates/settings.php:2
- > PHP Fatal error
User-side errors 0% from 1 test
🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Please fix the following user-side errors
- > GET request to /wp-admin/options-general.php?page=analytics
- > Javascript (severe) in unknown
/wp-admin/options-general.php?page=analytics 206:1 Uncaught ReferenceError: analytics is not defined
- > GET request to /wp-admin/options-general.php?page=analytics
- > Javascript (severe) in unknown
/wp-admin/options-general.php?page=analytics 208:2 Uncaught ReferenceError: analytics is not defined
Optimizations
Plugin configuration 93% from 29 tests
readme.txt 94% from 16 tests
Often overlooked, readme.txt is one of the most important files in your plugin
Attributes that require attention:
- Tags: You are using too many tags: 11 tag instead of maximum 10
segmentio/analytics-wordpress.php 92% from 13 tests
The main PHP script in "Analytics for WordPress — by Segment" version 1.0.13 is automatically included on every request by WordPress
It is important to fix the following:
- Main file name: The principal plugin file should be the same as the plugin slug ("segmentio.php" instead of "analytics-wordpress.php")
Code Analysis Passed 3 tests
File types Passed 1 test
🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Good job! No executable or dangerous file extensions detected1,601 lines of code in 28 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 22 | 490 | 794 | 1,420 |
Bourne Shell | 1 | 15 | 4 | 59 |
Bourne Again Shell | 1 | 20 | 13 | 49 |
XML | 1 | 0 | 0 | 32 |
Markdown | 1 | 21 | 0 | 24 |
YAML | 1 | 4 | 0 | 12 |
make | 1 | 5 | 7 | 5 |
PHP code Passed 2 tests
This is a short overview of cyclomatic complexity and code structure for this plugin
There were no cyclomatic complexity issued detected
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.26 |
Average class complexity | 8.93 |
▷ Minimum class complexity | 1.00 |
▷ Maximum class complexity | 52.00 |
Average method complexity | 2.11 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 24.00 |
Code structure | ||
---|---|---|
Namespaces | 0 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 14 | |
▷ Abstract classes | 1 | 7.14% |
▷ Concrete classes | 13 | 92.86% |
▷ Final classes | 0 | 0.00% |
Methods | 105 | |
▷ Static methods | 28 | 26.67% |
▷ Public methods | 101 | 96.19% |
▷ Protected methods | 0 | 0.00% |
▷ Private methods | 4 | 3.81% |
Functions | 7 | |
▷ Named functions | 4 | 57.14% |
▷ Anonymous functions | 3 | 42.86% |
Constants | 6 | |
▷ Global constants | 4 | 66.67% |
▷ Class constants | 2 | 33.33% |
▷ Public constants | 2 | 100.00% |
Plugin size Passed 2 tests
Image compression Passed 2 tests
Often times overlooked, PNG files can occupy unnecessary space in your plugin
No PNG images were found in this plugin