Benchmarks
Plugin footprint Passed 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Installer ran successfully
Server metrics [RAM: ▼0.01MB] [CPU: ▼300.83ms] Passed 4 tests
A check of server-side resources used by Ads Campaigns
Normal server usage
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.53 ▲0.02 | 59.88 ▲8.84 |
Dashboard /wp-admin | 3.43 ▲0.02 | 36.33 ▼7.58 |
Posts /wp-admin/edit.php | 3.66 ▲0.02 | 41.49 ▼0.57 |
Add New Post /wp-admin/post-new.php | 6.90 ▼0.07 | 102.39 ▼1,201.17 |
Media Library /wp-admin/upload.php | 3.31 ▲0.01 | 29.97 ▲5.99 |
Create a Google Ad /wp-admin/admin.php?page=ads-campaigns-create-google-ad | 3.25 | 24.62 |
Create a Facebook Ad /wp-admin/admin.php?page=ads-campaigns-create-facebook-ad | 3.25 | 30.65 |
Ads Dashboard /wp-admin/admin.php?page=ads-campaigns-dashboard | 3.25 | 31.85 |
Server storage [IO: ▲0.05MB] [DB: ▲0.00MB] Passed 3 tests
How much does this plugin use your filesystem and database?
This plugin installed successfully
Filesystem: 16 new files
Database: no new tables, no new options
Browser metrics Passed 4 tests
Checking browser requirements for Ads Campaigns
This plugin has a minimal impact on browser resources
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 3,798 ▲56 | 15.83 ▲0.13 | 6.78 ▲0.44 | 2.52 ▲0.33 |
Dashboard /wp-admin | 2,929 ▲68 | 6.15 ▼0.04 | 123.94 ▼4.42 | 201.37 ▲42.69 |
Posts /wp-admin/edit.php | 2,723 ▲38 | 3.11 ▼0.12 | 63.16 ▼10.09 | 144.44 ▼6.98 |
Add New Post /wp-admin/post-new.php | 1,860 ▲225 | 16.90 ▲0.61 | 453.20 ▼21.59 | 218.54 ▲56.75 |
Media Library /wp-admin/upload.php | 1,729 ▲34 | 5.46 ▼0.08 | 130.13 ▼29.84 | 199.82 ▼16.35 |
Create a Google Ad /wp-admin/admin.php?page=ads-campaigns-create-google-ad | 1,031 | 2.91 | 57.79 | 87.57 |
Create a Facebook Ad /wp-admin/admin.php?page=ads-campaigns-create-facebook-ad | 1,028 | 2.94 | 52.56 | 89.71 |
Ads Dashboard /wp-admin/admin.php?page=ads-campaigns-dashboard | 1,026 | 2.92 | 56.86 | 94.23 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests
🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
This plugin's uninstaller ran successfully
Smoke tests 25% from 4 tests
Server-side errors 0% from 1 test
🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Please fix the following server-side errors
- 2 occurences, only the last one shown
- > GET request to /wp-admin/admin.php?page=ads-campaigns-create-facebook-ad
- > Notice in wp-content/plugins/ads-campaigns/menu.php+73
Undefined index: post_id
- 7 occurences, only the last one shown
- > GET request to /wp-admin/admin.php?page=ads-campaigns-create-facebook-ad
- > Notice in wp-content/plugins/ads-campaigns/wishpond-ads-helpers.php+44
Undefined variable: out
- 2 occurences, only the last one shown
- > GET request to /wp-admin/admin.php?page=ads-campaigns-create-facebook-ad
- > Notice in wp-content/plugins/ads-campaigns/wishpond-ads-helpers.php+27
Trying to get property 'post_content' of non-object
- 3 occurences, only the last one shown
- > GET request to /wp-admin/admin.php?page=ads-campaigns-dashboard
- > Notice in wp-content/plugins/ads-campaigns/menu.php+61
Undefined variable: html
SRP 50% from 2 tests
🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please fix the following items
- 4× GET requests to PHP files have triggered server-side errors or warnings:
- > PHP Fatal error
Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/ads-campaigns/menu.php:3
- > PHP Fatal error
Uncaught Error: Call to undefined function add_action() in wp-content/plugins/ads-campaigns/register-assets.php:4
- > PHP Fatal error
Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/ads-campaigns/ads-campaigns.php:51
- > PHP Fatal error
Uncaught Error: Call to undefined function add_action() in wp-content/plugins/ads-campaigns/meta-boxes.php:5
- > PHP Fatal error
User-side errors 0% from 1 test
🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
There are user-side issues you should fix
- 5 occurences, only the last one shown
- > GET request to /wp-admin/admin.php?page=ads-campaigns-dashboard
- > Security (severe) in unknown
security - Refused to frame 'https://www.wishpond.com/' because an ancestor violates the following Content Security Policy directive: "frame-ancestors 'self'".
- > GET request to /wp-admin/admin.php?page=ads-campaigns-dashboard
- > Network (severe)
https://www.wishpond.com/central/ad_campaigns?utm_campaign=Wordpress&utm_source=wordpress.com&utm_medium=Ads+Campaigns - Failed to load resource: the server responded with a status of 404 ()
Optimizations
Plugin configuration 90% from 29 tests
readme.txt 81% from 16 tests
The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
Attributes that require attention:
- Screenshots: Please add descriptions for these screenshots #5, #6, #7, #8 in ads-campaigns/assets to your readme.txt
- Tags: There are too many tags (71 tag instead of maximum 10)
- Donate link: Invalid URI found ("")
ads-campaigns/ads-campaigns.php Passed 13 tests
This is the main PHP file of "Ads Campaigns" version 1.0, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
63 characters long description:
Create Ads with Google Adwords and Facebook Ads from Wordpress!
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
Success! There were no dangerous files found in this plugin582 lines of code in 13 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 10 | 86 | 88 | 479 |
JavaScript | 2 | 7 | 44 | 94 |
CSS | 1 | 0 | 0 | 9 |
PHP code Passed 2 tests
A short review of cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.19 |
Average class complexity | 3.50 |
▷ Minimum class complexity | 1.00 |
▷ Maximum class complexity | 5.00 |
Average method complexity | 1.60 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 4.00 |
Code structure | ||
---|---|---|
Namespaces | 0 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 6 | |
▷ Abstract classes | 0 | 0.00% |
▷ Concrete classes | 6 | 100.00% |
▷ Final classes | 0 | 0.00% |
Methods | 25 | |
▷ Static methods | 15 | 60.00% |
▷ Public methods | 24 | 96.00% |
▷ Protected methods | 0 | 0.00% |
▷ Private methods | 1 | 4.00% |
Functions | 14 | |
▷ Named functions | 14 | 100.00% |
▷ Anonymous functions | 0 | 0.00% |
Constants | 9 | |
▷ Global constants | 4 | 44.44% |
▷ Class constants | 5 | 55.56% |
▷ Public constants | 5 | 100.00% |
Plugin size 50% from 2 tests
Image compression 50% from 2 tests
Often times overlooked, PNG files can occupy unnecessary space in your plugin
2 PNG files occupy 0.02MB with 0.01MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
assets/images/fb-ads.png | 3.32KB | 0.68KB | ▼ 79.37% |
(invalid) assets/images/ajax-loader.png | 13.65KB | 0.00KB | ▼ 100.00% |