Benchmarks
Plugin footprint 58% from 16 tests
Installer 0% from 1 test
🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
These installer errors require your attention
- This plugin did not install gracefully
- > Deprecated in wp-content/plugins/ajax-campaign-monitor-forms/createsend-php/class/services_json.php+725
Array and string offset access syntax with curly braces is deprecated
Server metrics [RAM: ▲0.06MB] [CPU: ▼143.61ms] Passed 4 tests
Analyzing server-side resources used by Campaign Monitor Ajax Forms
Normal server usage
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 2.87 ▲0.15 | 34.72 ▲13.44 |
Dashboard /wp-admin | 3.15 ▲0.10 | 40.06 ▼4.98 |
Posts /wp-admin/edit.php | 3.20 ▲0.08 | 41.81 ▼12.96 |
Add New Post /wp-admin/post-new.php | 5.45 ▲0.01 | 88.26 ▼562.70 |
Media Library /wp-admin/upload.php | 3.03 ▲0.03 | 36.91 ▲6.20 |
Server storage [IO: ▲0.82MB] [DB: ▲0.00MB] Passed 3 tests
Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 203 new files
Database: no new tables, 1 new option
New WordPress options |
---|
widget_widget_cm_ajax |
Browser metrics Passed 4 tests
An overview of browser requirements for Campaign Monitor Ajax Forms
This plugin renders optimally with no browser resource issues detected
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 3,808 ▲171 | 16.11 ▲0.54 | 11.61 ▲2.78 | 51.16 ▲3.77 |
Dashboard /wp-admin | 2,970 ▲37 | 5.90 ▼0.04 | 137.59 ▼15.72 | 110.99 ▼5.61 |
Posts /wp-admin/edit.php | 2,739 ▼0 | 2.71 ▲0.01 | 68.46 ▲0.62 | 86.20 ▼2.83 |
Add New Post /wp-admin/post-new.php | 1,502 ▼89 | 18.50 ▼0.26 | 345.25 ▼35.04 | 105.08 ▼3.78 |
Media Library /wp-admin/upload.php | 1,807 ▼0 | 5.03 ▼0.01 | 181.39 ▲38.97 | 120.42 ▲6.36 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 75% from 4 tests
🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
Please fix the following items
- This plugin did not uninstall successfully, leaving 1 option in the database
- widget_widget_cm_ajax
Smoke tests 50% from 4 tests
Server-side errors Passed 1 test
🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though no errors were found, this is by no means an exhaustive test
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
Almost there! Just fix the following items
- 89× GET requests to PHP files return non-empty strings (only 10 are shown):
- > /wp-content/plugins/ajax-campaign-monitor-forms/createsend-php/samples/campaign/get_email_client_usage.php
- > /wp-content/plugins/ajax-campaign-monitor-forms/createsend-php/samples/list/delete_webhook.php
- > /wp-content/plugins/ajax-campaign-monitor-forms/createsend-php/samples/list/get_unconfirmed_subscribers.php
- > /wp-content/plugins/ajax-campaign-monitor-forms/createsend-php/samples/campaign/create.php
- > /wp-content/plugins/ajax-campaign-monitor-forms/createsend-php/samples/list/create_webhook.php
- > /wp-content/plugins/ajax-campaign-monitor-forms/createsend-php/samples/campaign/get_bounces.php
- > /wp-content/plugins/ajax-campaign-monitor-forms/createsend-php/samples/client/get_segments.php
- > /wp-content/plugins/ajax-campaign-monitor-forms/createsend-php/samples/list/get_webhooks.php
- > /wp-content/plugins/ajax-campaign-monitor-forms/createsend-php/samples/segment/clear_rules.php
- > /wp-content/plugins/ajax-campaign-monitor-forms/createsend-php/samples/template/get.php
- 50× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
- > PHP Notice
Trying to get property 'error' of non-object in wp-content/plugins/ajax-campaign-monitor-forms/createsend-php/samples/authentication/exchange_token.php on line 22
- > PHP Warning
require_once(wp-content/plugins/ajax-campaign-monitor-forms/createsend-php/tests/../vendor/autoload.php): failed to open stream: No such file or directory in wp-content/plugins/ajax-campaign-monitor-forms/createsend-php/tests/csrest_segments_test.php on line 3
- > PHP Warning
require_once(wp-content/plugins/ajax-campaign-monitor-forms/createsend-php/tests/../vendor/autoload.php): failed to open stream: No such file or directory in wp-content/plugins/ajax-campaign-monitor-forms/createsend-php/tests/csrest_subscribers_test.php on line 3
- > PHP Notice
Trying to get property 'DuplicateEmailsInSubmission' of non-object in wp-content/plugins/ajax-campaign-monitor-forms/createsend-php/samples/subscriber/import.php on line 70
- > PHP Notice
Undefined property: stdClass::$ResultData in wp-content/plugins/ajax-campaign-monitor-forms/createsend-php/samples/subscriber/import.php on line 70
- > PHP Fatal error
require_once(): Failed opening required 'wp-content/plugins/ajax-campaign-monitor-forms/createsend-php/tests/../vendor/autoload.php' (include_path='.:/usr/share/php') in wp-content/plugins/ajax-campaign-monitor-forms/createsend-php/tests/csrest_template_test.php on line 3
- > PHP Fatal error
Uncaught Error: Cannot use object of type stdClass as array in wp-content/plugins/ajax-campaign-monitor-forms/createsend-php/samples/transactional/timeline.php:36
- > PHP Fatal error
require_once(): Failed opening required 'wp-content/plugins/ajax-campaign-monitor-forms/createsend-php/tests/../vendor/autoload.php' (include_path='.:/usr/share/php') in wp-content/plugins/ajax-campaign-monitor-forms/createsend-php/tests/csrest_test.php on line 3
- > PHP Fatal error
require_once(): Failed opening required 'wp-content/plugins/ajax-campaign-monitor-forms/createsend-php/tests/../vendor/autoload.php' (include_path='.:/usr/share/php') in wp-content/plugins/ajax-campaign-monitor-forms/createsend-php/tests/csrest_lists_test.php on line 3
- > PHP Fatal error
require_once(): Failed opening required 'wp-content/plugins/ajax-campaign-monitor-forms/createsend-php/tests/class_tests/../../vendor/autoload.php' (include_path='.:/usr/share/php') in wp-content/plugins/ajax-campaign-monitor-forms/createsend-php/tests/class_tests/response_tests.php on line 3
- > PHP Notice
User-side errors Passed 1 test
🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser issues were found
Optimizations
Plugin configuration 87% from 29 tests
readme.txt 88% from 16 tests
You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
These attributes need to be fixed:
- Screenshots: These screenshots require images: #1 (Configuration), #2 (Sign-up form), #3 (Ajax submission), #4 (Feedback), #5 (Inserting a shortcode), #6 (Choosing a shortcode / creating a new shortcode)
- Plugin Name: Write the name of your plugin instead of "Plugin Name" on the first line (
=== ajax-campaign-monitor-forms ===
)
ajax-campaign-monitor-forms/cm-ajax.php 85% from 13 tests
The main PHP file in "Campaign Monitor Ajax Forms" ver. 1.5.0 adds more information about the plugin and also serves as the entry point for this plugin
The following require your attention:
- Text Domain: Please use dashes and lowercase characters for text domains
- Main file name: It is recommended to name the main PHP file as the plugin slug ("ajax-campaign-monitor-forms.php" instead of "cm-ajax.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
There were no executable files found in this plugin8,251 lines of code in 185 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 128 | 1,566 | 2,765 | 6,688 |
JSON | 48 | 1 | 0 | 1,017 |
Markdown | 4 | 142 | 0 | 341 |
PO File | 3 | 51 | 55 | 167 |
JavaScript | 1 | 0 | 0 | 28 |
YAML | 1 | 2 | 0 | 10 |
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.16 |
Average class complexity | 5.14 |
▷ Minimum class complexity | 1.00 |
▷ Maximum class complexity | 114.00 |
Average method complexity | 1.78 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 67.00 |
Code structure | ||
---|---|---|
Namespaces | 0 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 63 | |
▷ Abstract classes | 10 | 15.87% |
▷ Concrete classes | 53 | 84.13% |
▷ Final classes | 0 | 0.00% |
Methods | 334 | |
▷ Static methods | 2 | 0.60% |
▷ Public methods | 334 | 100.00% |
▷ Protected methods | 0 | 0.00% |
▷ Private methods | 0 | 0.00% |
Functions | 5 | |
▷ Named functions | 5 | 100.00% |
▷ Anonymous functions | 0 | 0.00% |
Constants | 35 | |
▷ Global constants | 35 | 100.00% |
▷ Class constants | 0 | 0.00% |
▷ Public constants | 0 | 0.00% |
Plugin size Passed 2 tests
Image compression Passed 2 tests
Often times overlooked, PNG files can occupy unnecessary space in your plugin
7 PNG files occupy 0.07MB with 0.03MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
screenshot-3.png | 5.55KB | 2.81KB | ▼ 49.38% |
screenshot-1.png | 20.24KB | 7.94KB | ▼ 60.76% |
screenshot-4.png | 6.88KB | 3.42KB | ▼ 50.33% |
screenshot-2.png | 5.47KB | 2.84KB | ▼ 48.00% |
js/image.png | 1.43KB | 1.51KB | 0.00% |