Benchmarks
Plugin footprint 65% from 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | Checking the installer triggered no errors
This plugin's installer ran successfully
Server metrics [RAM: ▲5.12MB] [CPU: ▲20.64ms] 75% from 4 tests
Analyzing server-side resources used by WP Affiliate Disclosure
Please take the time to fix the following items
- Extra RAM: The extra memory usage must be under 5MB (currently 5.12MB on /wp-admin/admin.php?page=freemius)
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 8.92 ▲5.46 | 64.58 ▲23.50 |
Dashboard /wp-admin | 8.94 ▲5.60 | 77.57 ▲17.50 |
Posts /wp-admin/edit.php | 8.94 ▲5.59 | 80.25 ▲29.85 |
Add New Post /wp-admin/post-new.php | 9.71 ▲3.83 | 110.07 ▲11.69 |
Media Library /wp-admin/upload.php | 8.94 ▲5.71 | 72.33 ▲38.48 |
Freemius Debug [v.2.6.0] /wp-admin/admin.php?page=freemius | 8.94 | 63.46 |
Server storage [IO: ▲5.63MB] [DB: ▲0.00MB] Passed 3 tests
Analyzing filesystem and database footprints of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 255 new files
Database: no new tables, 9 new options
New WordPress options |
---|
widget_recent-posts |
can_compress_scripts |
theysaidso_admin_options |
db_upgraded |
widget_recent-comments |
fs_active_plugins |
fs_debug_mode |
fs_accounts |
widget_theysaidso_widget |
Browser metrics Passed 4 tests
An overview of browser requirements for WP Affiliate Disclosure
Minimal impact on browser resources
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 3,005 ▲243 | 14.99 ▲0.84 | 1.52 ▼0.17 | 27.08 ▼12.32 |
Dashboard /wp-admin | 2,406 ▲226 | 6.43 ▲0.76 | 121.15 ▲34.02 | 43.14 ▲2.79 |
Posts /wp-admin/edit.php | 2,348 ▲245 | 3.52 ▲1.52 | 59.93 ▲16.26 | 39.22 ▲3.92 |
Add New Post /wp-admin/post-new.php | 1,459 ▼67 | 18.04 ▼5.45 | 611.66 ▼25.18 | 36.36 ▼13.03 |
Media Library /wp-admin/upload.php | 1,478 ▲81 | 4.42 ▲0.20 | 85.81 ▼22.24 | 44.63 ▼0.89 |
Freemius Debug [v.2.6.0] /wp-admin/admin.php?page=freemius | 1,307 | 3.41 | 53.63 | 29.97 |
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
- Uninstall procedure had uncaught errors
- > Notice in wp-content/plugins/wp-affiliate-disclosure/freemius/includes/class-freemius.php+8546
Undefined property: stdClass::$plugins
- The uninstall procedure has failed, leaving 9 options in the database
- widget_theysaidso_widget
- widget_recent-posts
- fs_active_plugins
- fs_accounts
- theysaidso_admin_options
- can_compress_scripts
- widget_recent-comments
- db_upgraded
- fs_debug_mode
Smoke tests 75% 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)
The smoke test was a success, however most plugin functionality was not tested
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
- 14× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
- > PHP Fatal error
Uncaught Error: Call to undefined function esc_html__() in wp-content/plugins/wp-affiliate-disclosure/builder/start-wizard/views/step_4.php:15
- > PHP Fatal error
Uncaught Error: Call to undefined function get_post_types() in wp-content/plugins/wp-affiliate-disclosure/builder/start-wizard/views/step_5.php:11
- > PHP Fatal error
Uncaught Error: Call to undefined function wpadc() in wp-content/plugins/wp-affiliate-disclosure/builder/builder/controller.php:67
- > PHP Warning
Use of undefined constant WPADC_PATH - assumed 'WPADC_PATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/wp-affiliate-disclosure/includes/freemius.php on line 21
- > PHP Fatal error
Uncaught Error: Call to undefined function get_post_types() in wp-content/plugins/wp-affiliate-disclosure/builder/settings-page/views/form.php:11
- > PHP Fatal error
Uncaught Error: Call to undefined function esc_html__() in wp-content/plugins/wp-affiliate-disclosure/builder/start-wizard/views/step_6.php:13
- > PHP Fatal error
Uncaught Error: Call to undefined function esc_html__() in wp-content/plugins/wp-affiliate-disclosure/builder/start-wizard/views/step_3.php:13
- > PHP Warning
require_once(WPADC_PATH/freemius/start.php): failed to open stream: No such file or directory in wp-content/plugins/wp-affiliate-disclosure/includes/freemius.php on line 21
- > PHP Fatal error
Uncaught Error: Call to undefined function wpadc() in wp-content/plugins/wp-affiliate-disclosure/includes/help/free_version.php:2
- > PHP Fatal error
Uncaught Error: Call to undefined function wpadc() in wp-content/plugins/wp-affiliate-disclosure/builder/settings-page/controller.php:68
- > 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 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
10 plugin tags: disclosure statement, ftc, ftc disclosure statement, affiliate disclaimer statement, disclosure...
wp-affiliate-disclosure/functions.php 85% from 13 tests
"WP Affiliate Disclosure" version 1.2.7's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
The following require your attention:
- Domain Path: Use only dashes and lowercase characters for the domain path ("/langCopyright 2012 - 2023 Smashing Advantage Enterprise.")
- Main file name: It is recommended to name the main PHP file as the plugin slug ("wp-affiliate-disclosure.php" instead of "functions.php")
Code Analysis 97% from 3 tests
File types Passed 1 test
🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Good job! No executable or dangerous file extensions detected46,425 lines of code in 181 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 146 | 8,802 | 18,591 | 36,370 |
CSS | 21 | 121 | 32 | 3,993 |
JavaScript | 11 | 798 | 742 | 3,133 |
SVG | 1 | 0 | 0 | 2,671 |
PO File | 1 | 98 | 133 | 236 |
JSON | 1 | 0 | 0 | 22 |
PHP code 50% from 2 tests
A brief analysis of cyclomatic complexity and code structure for this plugin
It is recommended to fix the following
- Cyclomatic complexity of classes has to be reduced to less than 1000 (currently 3,096)
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.62 |
Average class complexity | 74.66 |
▷ Minimum class complexity | 1.00 |
▷ Maximum class complexity | 3,096.00 |
Average method complexity | 4.54 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 94.00 |
Code structure | ||
---|---|---|
Namespaces | 0 | |
Interfaces | 1 | |
Traits | 0 | |
Classes | 64 | |
▷ Abstract classes | 2 | 3.12% |
▷ Concrete classes | 62 | 96.88% |
▷ Final classes | 0 | 0.00% |
Methods | 1,382 | |
▷ Static methods | 203 | 14.69% |
▷ Public methods | 982 | 71.06% |
▷ Protected methods | 17 | 1.23% |
▷ Private methods | 383 | 27.71% |
Functions | 119 | |
▷ Named functions | 119 | 100.00% |
▷ Anonymous functions | 0 | 0.00% |
Constants | 150 | |
▷ Global constants | 103 | 68.67% |
▷ Class constants | 47 | 31.33% |
▷ Public constants | 47 | 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
4 PNG files occupy 0.03MB with 0.02MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
freemius/assets/img/wp-affiliate-disclosure.png | 7.48KB | 2.50KB | ▼ 66.61% |
freemius/assets/img/theme-icon.png | 10.97KB | 5.78KB | ▼ 47.37% |
assets/img/logo.png | 7.48KB | 2.50KB | ▼ 66.61% |
freemius/assets/img/plugin-icon.png | 9.16KB | 5.26KB | ▼ 42.58% |