Benchmarks
Plugin footprint Passed 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.09MB] [CPU: ▼296.40ms] Passed 4 tests
Analyzing server-side resources used by AB Testing with Javascript
Server-side resource usage in normal parameters
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.69 ▲0.18 | 54.57 ▼34.82 |
Dashboard /wp-admin | 3.52 ▲0.12 | 34.38 ▼3.93 |
Posts /wp-admin/edit.php | 3.75 ▲0.11 | 37.82 ▼1.73 |
Add New Post /wp-admin/post-new.php | 6.99 ▲0.02 | 93.43 ▼1,145.13 |
Media Library /wp-admin/upload.php | 3.40 ▲0.11 | 31.91 ▲5.66 |
Server storage [IO: ▲0.14MB] [DB: ▲0.00MB] Passed 3 tests
Filesystem and database footprint
No storage issues were detected
Filesystem: 18 new files
Database: no new tables, no new options
Browser metrics Passed 4 tests
An overview of browser requirements for AB Testing with Javascript
Normal browser usage
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 3,798 ▲76 | 15.69 ▲0.53 | 6.51 ▲0.67 | 2.33 ▲0.09 |
Dashboard /wp-admin | 2,907 ▲57 | 6.03 ▼0.13 | 124.37 ▼10.83 | 178.11 ▼53.41 |
Posts /wp-admin/edit.php | 2,703 ▲9 | 3.36 ▲0.11 | 66.84 ▲3.31 | 202.25 ▲54.59 |
Add New Post /wp-admin/post-new.php | 1,671 ▼1 | 16.65 ▼4.79 | 459.32 ▼20.35 | 160.88 ▼36.75 |
Media Library /wp-admin/upload.php | 1,713 ▲15 | 5.56 ▲0.05 | 161.31 ▼11.40 | 191.33 ▼0.26 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests
🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Uninstaller ran successfully
Smoke tests 50% from 4 tests
Server-side errors Passed 1 test
🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
The smoke test was a success, however most plugin functionality was not tested
SRP 0% from 2 tests
🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
The following issues need your attention
- 1× PHP files output non-empty strings when accessed directly via GET requests:
- > /wp-content/plugins/ab-testing-with-javascript/split-testing-page.php
- 6× PHP files trigger server errors when accessed directly:
- > PHP Fatal error
Uncaught Error: Call to undefined function add_action() in wp-content/plugins/ab-testing-with-javascript/functions/load-resources.php:12
- > PHP Fatal error
Uncaught Error: Call to undefined function add_action() in wp-content/plugins/ab-testing-with-javascript/functions/ajax-requests.php:29
- > PHP Fatal error
Uncaught Error: Call to undefined function add_action() in wp-content/plugins/ab-testing-with-javascript/functions/split-testing-menu.php:6
- > PHP Fatal error
Uncaught Error: Call to undefined function site_url() in wp-content/plugins/ab-testing-with-javascript/split-testing-page.php:119
- > PHP Fatal error
Uncaught Error: Call to undefined function add_action() in wp-content/plugins/ab-testing-with-javascript/functions/split-testing-menu.php:6
- > PHP Fatal error
Uncaught Error: Call to undefined function add_action() in wp-content/plugins/ab-testing-with-javascript/functions/create-app-js-file.php:18
- > 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)
There were no browser issues found
Optimizations
Plugin configuration 96% from 29 tests
readme.txt Passed 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
4 plugin tags: ab tests, content experiments, ab experiments, ab testing
ab-testing-with-javascript/split-testing.php 92% from 13 tests
"AB Testing with Javascript" version 1.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
Please make the necessary changes and fix the following:
- Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("ab-testing-with-javascript.php" instead of "split-testing.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
Everything looks great! No dangerous files found in this plugin1,641 lines of code in 12 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
JavaScript | 2 | 153 | 235 | 773 |
PHP | 6 | 254 | 227 | 641 |
CSS | 2 | 24 | 0 | 108 |
Markdown | 1 | 46 | 0 | 108 |
HTML | 1 | 0 | 0 | 11 |
PHP code Passed 2 tests
This is a very shot review of 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.32 |
Average class complexity | 24.75 |
▷ Minimum class complexity | 1.00 |
▷ Maximum class complexity | 94.00 |
Average method complexity | 3.11 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 13.00 |
Code structure | ||
---|---|---|
Namespaces | 0 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 4 | |
▷ Abstract classes | 0 | 0.00% |
▷ Concrete classes | 4 | 100.00% |
▷ Final classes | 0 | 0.00% |
Methods | 45 | |
▷ Static methods | 0 | 0.00% |
▷ Public methods | 20 | 44.44% |
▷ Protected methods | 0 | 0.00% |
▷ Private methods | 25 | 55.56% |
Functions | 0 | |
▷ Named functions | 0 | 0.00% |
▷ Anonymous functions | 0 | 0.00% |
Constants | 1 | |
▷ Global constants | 1 | 100.00% |
▷ Class constants | 0 | 0.00% |
▷ Public constants | 0 | 0.00% |
Plugin size Passed 2 tests
Image compression Passed 2 tests
PNG files should be compressed to save space and minimize bandwidth usage
No PNG files were detected