Benchmarks
Plugin footprint 65% from 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed successfully, without throwing any errors or notices
Server metrics [RAM: ▲0.09MB] [CPU: ▼3.27ms] Passed 4 tests
An overview of server-side resources used by CannAffiliate Advertiser Setup
This plugin has minimal impact on server resources
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.56 ▲0.09 | 41.95 ▼6.12 |
Dashboard /wp-admin | 3.40 ▲0.09 | 46.92 ▲0.10 |
Posts /wp-admin/edit.php | 3.51 ▲0.15 | 46.13 ▼1.87 |
Add New Post /wp-admin/post-new.php | 6.00 ▲0.11 | 86.71 ▼3.03 |
Media Library /wp-admin/upload.php | 3.32 ▲0.09 | 33.24 ▼2.07 |
CannAffiliate Setup /wp-admin/tools.php?page=cannaffiliate-settings | 3.29 | 31.59 |
Server storage [IO: ▲0.05MB] [DB: ▲0.00MB] Passed 3 tests
How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 23 new files
Database: 1 new table, 7 new options
New tables |
---|
wp_cannaffiliate_transactions |
New WordPress options |
---|
db_upgraded |
widget_recent-posts |
widget_theysaidso_widget |
theysaidso_admin_options |
plugin_name_db_version |
can_compress_scripts |
widget_recent-comments |
Browser metrics Passed 4 tests
CannAffiliate Advertiser Setup: an overview of browser usage
This plugin has a minimal impact on browser resources
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,891 ▲145 | 13.54 ▼0.83 | 5.32 ▲2.84 | 42.21 ▼2.01 |
Dashboard /wp-admin | 2,214 ▲26 | 4.84 ▼0.19 | 104.75 ▲2.46 | 39.99 ▼7.48 |
Posts /wp-admin/edit.php | 2,097 ▲8 | 2.00 ▲0.01 | 38.05 ▲2.39 | 36.70 ▲1.62 |
Add New Post /wp-admin/post-new.php | 1,521 ▼12 | 23.07 ▼0.13 | 691.21 ▲20.69 | 53.78 ▼5.32 |
Media Library /wp-admin/upload.php | 1,396 ▲5 | 4.24 ▲0.11 | 96.78 ▼7.29 | 40.74 ▼1.82 |
CannAffiliate Setup /wp-admin/tools.php?page=cannaffiliate-settings | 821 | 2.05 | 25.38 | 30.17 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 50% from 4 tests
🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
These items require your attention
- Zombie tables detected upon uninstall: 1 table
- wp_cannaffiliate_transactions
- Zombie WordPress options detected upon uninstall: 7 options
- widget_theysaidso_widget
- widget_recent-comments
- theysaidso_admin_options
- can_compress_scripts
- widget_recent-posts
- db_upgraded
- plugin_name_db_version
Smoke tests 50% from 4 tests
Server-side errors Passed 1 test
🔹 Test weight: 20 | A smoke test targeting server-side errors
Good news, no errors were detected
SRP 0% from 2 tests
🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please take a closer look at the following
- 1× PHP files perform the task of outputting text when accessed with GET requests:
- > /wp-content/plugins/cannaffiliate-advertiser-setup/public/partials/cannaffiliate-public-display.php
- 1× PHP files trigger server errors when accessed directly:
- > PHP Fatal error
Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/cannaffiliate-advertiser-setup/admin/partials/cannaffiliate-admin-settings-display.php:20
- > 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)
No browser issues were found
Optimizations
Plugin configuration 93% from 29 tests
readme.txt Passed 16 tests
The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
1 plugin tags: cannaffiliate
cannaffiliate-advertiser-setup/cannaffiliate.php 85% from 13 tests
"CannAffiliate Advertiser Setup" version 1.2's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
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 ("cannaffiliate-advertiser-setup.php" instead of "cannaffiliate.php")
- Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6
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
Everything looks great! No dangerous files found in this plugin427 lines of code in 16 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 12 | 157 | 549 | 407 |
CSS | 2 | 2 | 8 | 14 |
JavaScript | 2 | 3 | 54 | 6 |
PHP code Passed 2 tests
A brief analysis of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity problems
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.23 |
Average class complexity | 5.71 |
▷ Minimum class complexity | 1.00 |
▷ Maximum class complexity | 31.00 |
Average method complexity | 2.03 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 13.00 |
Code structure | ||
---|---|---|
Namespaces | 0 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 7 | |
▷ Abstract classes | 0 | 0.00% |
▷ Concrete classes | 7 | 100.00% |
▷ Final classes | 0 | 0.00% |
Methods | 32 | |
▷ Static methods | 2 | 6.25% |
▷ Public methods | 27 | 84.38% |
▷ Protected methods | 0 | 0.00% |
▷ Private methods | 5 | 15.62% |
Functions | 3 | |
▷ Named functions | 3 | 100.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
2 PNG files occupy 0.01MB with 0.01MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
admin/img/logo-icon.png | 3.00KB | 1.58KB | ▼ 47.30% |
admin/img/CannAffiliate-Logo.png | 7.52KB | 3.06KB | ▼ 59.27% |