Benchmarks
Plugin footprint 83% from 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed gracefully, with no errors
Server metrics [RAM: ▲0.04MB] [CPU: ▼1.69ms] Passed 4 tests
Analyzing server-side resources used by Attribution for WordPress
No issues were detected with server-side resource usage
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.50 ▲0.04 | 38.30 ▼6.00 |
Dashboard /wp-admin | 3.34 ▲0.04 | 46.19 ▲0.01 |
Posts /wp-admin/edit.php | 3.39 ▲0.04 | 49.46 ▲1.61 |
Add New Post /wp-admin/post-new.php | 5.92 ▲0.03 | 94.84 ▼2.36 |
Media Library /wp-admin/upload.php | 3.26 ▲0.03 | 40.49 ▲5.65 |
Attribution /wp-admin/options-general.php?page=attribution | 3.25 | 30.90 |
Server storage [IO: ▲0.37MB] [DB: ▲0.00MB] Passed 3 tests
A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 25 new files
Database: no new tables, 7 new options
New WordPress options |
---|
attribution_wordpress_options |
can_compress_scripts |
widget_recent-comments |
widget_theysaidso_widget |
theysaidso_admin_options |
widget_recent-posts |
db_upgraded |
Browser metrics Passed 4 tests
An overview of browser requirements for Attribution for WordPress
This plugin has a minimal impact on browser resources
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,810 ▲64 | 13.28 ▼1.09 | 4.94 ▲2.96 | 40.07 ▲1.64 |
Dashboard /wp-admin | 2,210 ▲19 | 5.83 ▲0.97 | 97.01 ▼8.38 | 38.45 ▼6.54 |
Posts /wp-admin/edit.php | 2,096 ▲10 | 2.02 ▲0.03 | 38.61 ▲0.77 | 34.54 ▼5.31 |
Add New Post /wp-admin/post-new.php | 1,539 ▼3 | 23.26 ▲5.09 | 659.04 ▲20.87 | 59.29 ▲9.47 |
Media Library /wp-admin/upload.php | 1,392 ▲1 | 4.23 ▲0.04 | 99.86 ▼0.77 | 41.44 ▼2.69 |
Attribution /wp-admin/options-general.php?page=attribution | 943 | 2.04 | 26.17 | 29.40 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 75% from 4 tests
🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
- The uninstall procedure has failed, leaving 6 options in the database
- widget_recent-posts
- widget_recent-comments
- widget_theysaidso_widget
- can_compress_scripts
- theysaidso_admin_options
- db_upgraded
Smoke tests 50% 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 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
- 16× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
- > PHP Fatal error
Uncaught Error: Class 'WP_UnitTestCase' not found in wp-content/plugins/attribution/tests/test-attribution-analytics-wordpress.php:3
- > PHP Fatal error
Uncaught Error: Class 'Attribution_Commerce' not found in wp-content/plugins/attribution/integrations/ecommerce/woocommerce.php:3
- > PHP Fatal error
require_once(): Failed opening required '/tmp/wordpress-tests-lib/includes/functions.php' (include_path='.:/usr/share/php') in wp-content/plugins/attribution/tests/bootstrap.php on line 9
- > PHP Fatal error
Uncaught Error: Class 'WP_UnitTestCase' not found in wp-content/plugins/attribution/tests/test-attribution-settings.php:2
- > PHP Fatal error
Uncaught Error: Class 'WP_UnitTestCase' not found in wp-content/plugins/attribution/tests/test-attribution-analytics.php:3
- > PHP Fatal error
Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/attribution/attribution-wordpress.php:1084
- > PHP Warning
require_once(/tmp/wordpress-tests-lib/includes/functions.php): failed to open stream: No such file or directory in wp-content/plugins/attribution/tests/bootstrap.php on line 9
- > PHP Fatal error
Uncaught Error: Call to undefined function esc_js() in wp-content/plugins/attribution/templates/track.php:2
- > PHP Notice
Undefined variable: ignore in wp-content/plugins/attribution/templates/snippet.php on line 3
- > PHP Fatal error
Uncaught Error: Call to undefined function _e() in wp-content/plugins/attribution/templates/settings.php:2
- > PHP Fatal error
User-side errors 0% from 1 test
🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
These are user-side errors you should fix
- > GET request to /wp-admin/options-general.php?page=attribution
- > Javascript (severe) in unknown
/wp-admin/options-general.php?page=attribution 205:1 Uncaught ReferenceError: Attribution is not defined
Optimizations
Plugin configuration 90% from 29 tests
readme.txt 88% 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
These attributes need your attention:
- Contributors: The plugin contributors field is not present
- Requires php: Invalid plugin version format
attribution/attribution-wordpress.php 92% from 13 tests
The principal PHP file in "Attribution for WordPress" v. 1.0.5 is loaded by WordPress automatically on each request
Please make the necessary changes and fix the following:
- Main file name: Name the main plugin file the same as the plugin slug ("attribution.php" instead of "attribution-wordpress.php")
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
Success! There were no dangerous files found in this plugin1,530 lines of code in 22 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 17 | 479 | 779 | 1,373 |
Bourne Shell | 1 | 15 | 4 | 59 |
Bourne Again Shell | 1 | 20 | 13 | 49 |
XML | 1 | 0 | 0 | 32 |
Markdown | 1 | 13 | 0 | 12 |
make | 1 | 5 | 7 | 5 |
PHP code Passed 2 tests
An short overview of logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity problems
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.26 |
Average class complexity | 12.30 |
▷ Minimum class complexity | 1.00 |
▷ Maximum class complexity | 52.00 |
Average method complexity | 2.20 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 24.00 |
Code structure | ||
---|---|---|
Namespaces | 0 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 10 | |
▷ Abstract classes | 1 | 10.00% |
▷ Concrete classes | 9 | 90.00% |
▷ Final classes | 0 | 0.00% |
Methods | 100 | |
▷ Static methods | 27 | 27.00% |
▷ Public methods | 96 | 96.00% |
▷ Protected methods | 0 | 0.00% |
▷ Private methods | 4 | 4.00% |
Functions | 6 | |
▷ Named functions | 3 | 50.00% |
▷ Anonymous functions | 3 | 50.00% |
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
It is recommended to compress PNG files in your plugin to minimize bandwidth usage
1 PNG file occupies 0.27MB with 0.16MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
assets/screenshot-1.png | 271.87KB | 109.27KB | ▼ 59.81% |