Benchmarks
Plugin footprint Passed 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
This plugin's installer ran successfully
Server metrics [RAM: ▼0.01MB] [CPU: ▼147.22ms] Passed 4 tests
Analyzing server-side resources used by Gravity Forms Campaign Fields Add-On
Server-side resource usage in normal parameters
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 2.83 ▲0.00 | 36.00 ▼0.37 |
Dashboard /wp-admin | 3.06 ▲0.00 | 46.05 ▲6.23 |
Posts /wp-admin/edit.php | 3.11 ▼0.01 | 42.35 ▼10.76 |
Add New Post /wp-admin/post-new.php | 5.42 ▼0.02 | 89.84 ▼570.27 |
Media Library /wp-admin/upload.php | 3.00 ▲0.00 | 34.03 ▼7.48 |
Server storage [IO: ▲6.03MB] [DB: ▲0.00MB] Passed 3 tests
Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 435 new files
Database: no new tables, no new options
Browser metrics Passed 4 tests
Gravity Forms Campaign Fields Add-On: an overview of browser usage
Normal browser usage
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 3,703 ▲66 | 15.90 ▲0.40 | 11.30 ▲2.59 | 50.58 ▲2.78 |
Dashboard /wp-admin | 2,973 ▲39 | 5.87 ▼0.09 | 136.08 ▼12.45 | 110.13 ▼2.61 |
Posts /wp-admin/edit.php | 2,739 ▼0 | 2.70 ▲0.01 | 73.13 ▲7.40 | 90.92 ▼4.22 |
Add New Post /wp-admin/post-new.php | 1,672 ▲91 | 18.77 ▲0.37 | 377.29 ▼28.31 | 112.52 ▼0.51 |
Media Library /wp-admin/upload.php | 1,810 ▲3 | 5.00 ▼0.02 | 155.31 ▼25.02 | 117.67 ▼14.91 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests
🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
This plugin's uninstaller ran successfully
Smoke tests 50% from 4 tests
Server-side errors Passed 1 test
🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Good news, no errors were detected
SRP 0% 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
Please take a closer look at the following
- 5× PHP files output non-empty strings when accessed directly via GET requests:
- > /wp-content/plugins/gf-campaign-fields/lib/whichbrowser/parser/bin/update-browser-ids.php
- > /wp-content/plugins/gf-campaign-fields/lib/whichbrowser/server/detect.php
- > /wp-content/plugins/gf-campaign-fields/lib/whichbrowser/parser/bin/update-profiles.php
- > /wp-content/plugins/gf-campaign-fields/lib/whichbrowser/parser/bin/update-chrome.php
- > /wp-content/plugins/gf-campaign-fields/lib/whichbrowser/server/index.php
- 87× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
- > PHP Fatal error
Uncaught Error: Class 'WhichBrowser\\Data\\BrowserIds' not found in wp-content/plugins/gf-campaign-fields/lib/whichbrowser/parser/data/id-android.php:7
- > PHP Fatal error
Uncaught Error: Class 'WhichBrowser\\Data\\DeviceModels' not found in wp-content/plugins/gf-campaign-fields/lib/whichbrowser/parser/data/indices/models-bada.php:5
- > PHP Fatal error
Uncaught Error: Class 'WhichBrowser\\Model\\Primitive\ameVersion' not found in wp-content/plugins/gf-campaign-fields/lib/whichbrowser/parser/src/Model/Using.php:7
- > PHP Fatal error
Uncaught Error: Class 'WhichBrowser\\Model\\Primitive\ameVersion' not found in wp-content/plugins/gf-campaign-fields/lib/whichbrowser/parser/src/Model/Browser.php:7
- > PHP Fatal error
Uncaught Error: Class 'WhichBrowser\\Model\\Primitive\\Base' not found in wp-content/plugins/gf-campaign-fields/lib/whichbrowser/parser/src/Model/Primitive/NameVersion.php:11
- > PHP Notice
Undefined index: HTTPS in wp-content/plugins/gf-campaign-fields/lib/whichbrowser/server/index.php on line 125
- > PHP Fatal error
Uncaught Error: Class 'PHPUnit_Framework_TestCase' not found in wp-content/plugins/gf-campaign-fields/lib/whichbrowser/parser/tests/unit/Model/FamilyTest.php:12
- > PHP Warning
file_get_contents(https://api.whichbrowser.net/resources/profiles.json): failed to open stream: HTTP request failed! HTTP/1.0 500 Internal Server Error\r in wp-content/plugins/gf-campaign-fields/lib/whichbrowser/parser/bin/update-profiles.php on line 7
- > PHP Fatal error
Uncaught Error: Class 'WhichBrowser\\Data\\DeviceModels' not found in wp-content/plugins/gf-campaign-fields/lib/whichbrowser/parser/data/indices/models-asha.php:5
- > PHP Fatal error
Uncaught Error: Class 'WhichBrowser\\Data\\DeviceModels' not found in wp-content/plugins/gf-campaign-fields/lib/whichbrowser/parser/data/models-touchwiz.php:5
- > PHP Fatal error
User-side errors Passed 1 test
🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser errors were detected
Optimizations
Plugin configuration Passed 29 tests
readme.txt Passed 16 tests
The readme.txt file uses markdown syntax to describe your plugin to the world
3 plugin tags: marketing, google analytics, gravity forms
gf-campaign-fields/gf-campaign-fields.php Passed 13 tests
"Gravity Forms Campaign Fields Add-On" version 2.4.1's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
78 characters long description:
Creates new field types that are populated with Google Analytics campaign data
Code Analysis 97% from 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
Success! There were no dangerous files found in this plugin75,085 lines of code in 422 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 158 | 4,925 | 1,616 | 51,371 |
YAML | 229 | 14 | 0 | 21,369 |
Markdown | 8 | 511 | 0 | 1,212 |
JavaScript | 18 | 148 | 1 | 754 |
JSON | 7 | 7 | 0 | 332 |
XML | 2 | 7 | 0 | 47 |
PHP code 50% from 2 tests
This is a very shot review of cyclomatic complexity and code structure
Please fix the following
- Method cyclomatic complexity has to be reduced to less than 100 (currently 105)
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.44 |
Average class complexity | 26.35 |
▷ Minimum class complexity | 1.00 |
▷ Maximum class complexity | 474.00 |
Average method complexity | 6.38 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 105.00 |
Code structure | ||
---|---|---|
Namespaces | 12 | |
Interfaces | 4 | |
Traits | 25 | |
Classes | 63 | |
▷ Abstract classes | 0 | 0.00% |
▷ Concrete classes | 63 | 100.00% |
▷ Final classes | 0 | 0.00% |
Methods | 442 | |
▷ Static methods | 33 | 7.47% |
▷ Public methods | 257 | 58.14% |
▷ Protected methods | 0 | 0.00% |
▷ Private methods | 185 | 41.86% |
Functions | 28 | |
▷ Named functions | 14 | 50.00% |
▷ Anonymous functions | 14 | 50.00% |
Constants | 76 | |
▷ Global constants | 2 | 2.63% |
▷ Class constants | 74 | 97.37% |
▷ Public constants | 74 | 100.00% |
Plugin size Passed 2 tests
Image compression Passed 2 tests
All PNG images should be compressed to minimize bandwidth usage for end users
No PNG images were found in this plugin