Benchmarks
Plugin footprint 23% from 16 tests
Installer 0% from 1 test
🔺 Critical test (weight: 50) | The install procedure must perform silently
You still need to fix the following installer errors
- The plugin cannot be installed
- > Deprecated in wp-content/plugins/wp-affiliate-links/plugin.php+372
Function create_function() is deprecated
Server metrics [RAM: ▼1.12MB] [CPU: ▼324.02ms] Passed 4 tests
Analyzing server-side resources used by WP Affiliate Links
Server-side resource usage in normal parameters
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.61 ▲0.10 | 58.72 ▲5.57 |
Dashboard /wp-admin | 3.20 ▼0.20 | 20.01 ▼13.38 |
Posts /wp-admin/edit.php | 3.21 ▼0.44 | 20.72 ▼17.11 |
Add New Post /wp-admin/post-new.php | 3.21 ▼3.77 | 22.71 ▼1,258.72 |
Media Library /wp-admin/upload.php | 3.21 ▼0.09 | 17.63 ▼6.85 |
Manage Links /wp-admin/admin.php?page=wpal-admin-links | 3.21 | 20.39 |
Create Link /wp-admin/admin.php?page=wpal-admin-add | 3.21 | 21.40 |
Auto Link Keywords /wp-admin/admin.php?page=wpal-admin-keywords | 3.21 | 20.99 |
Statistics /wp-admin/admin.php?page=wpal-admin-statistics | 3.21 | 19.86 |
Settings /wp-admin/admin.php?page=wpal-admin-settings | 3.21 | 19.78 |
Edit Link /wp-admin/admin.php?page=wpal-admin-edit | 3.21 | 20.23 |
TinyMCE /wp-admin/admin.php?page=wpal-admin-tinymce | 3.21 | 18.71 |
Server storage [IO: ▲3.04MB] [DB: ▲9.62MB] Passed 3 tests
Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 126 new files
Database: 7 new tables, 1 new option
New tables |
---|
wp_wpal_keywords |
wp_wpal_geoipcountry |
wp_wpal_links |
wp_wpal_destinations |
wp_wpal_stats |
wp_wpal_automatches |
wp_wpal_rules |
New WordPress options |
---|
WPAL_Plugin_Options |
Browser metrics Passed 4 tests
WP Affiliate Links: an overview of browser usage
Normal browser usage
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 3,815 ▲93 | 15.92 ▼0.06 | 6.15 ▼0.52 | 2.33 ▼0.41 |
Dashboard /wp-admin | 2,942 ▲81 | 6.13 ▼0.02 | 122.80 ▼10.13 | 157.01 ▼3.25 |
Posts /wp-admin/edit.php | 2,738 ▲44 | 3.25 ▲0.02 | 62.47 ▼1.32 | 137.88 ▼2.65 |
Add New Post /wp-admin/post-new.php | 1,692 ▼68 | 16.03 ▼1.15 | 416.78 ▼5.61 | 155.11 ▼4.85 |
Media Library /wp-admin/upload.php | 1,744 ▲46 | 5.53 ▼0.02 | 146.39 ▲3.11 | 188.83 ▲1.95 |
Manage Links /wp-admin/admin.php?page=wpal-admin-links | 1,356 | 3.78 | 78.19 | 130.15 |
Create Link /wp-admin/admin.php?page=wpal-admin-add | 4,410 | 3.84 | 83.79 | 154.43 |
Auto Link Keywords /wp-admin/admin.php?page=wpal-admin-keywords | 1,327 | 3.61 | 63.89 | 101.69 |
Statistics /wp-admin/admin.php?page=wpal-admin-statistics | 1,239 | 3.54 | 62.56 | 102.11 |
Settings /wp-admin/admin.php?page=wpal-admin-settings | 1,759 | 3.56 | 68.07 | 188.97 |
Edit Link /wp-admin/admin.php?page=wpal-admin-edit | 4,390 | 3.66 | 66.05 | 127.27 |
TinyMCE /wp-admin/admin.php?page=wpal-admin-tinymce | 493 | 3.04 | 51.72 | 0.09 |
Uninstaller [IO: ▲0.00MB] [DB: ▲9.62MB] 25% from 4 tests
🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
- This plugin cannot be uninstalled
- > Deprecated in wp-content/plugins/wp-affiliate-links/actions/admin_init.php+8
Function create_function() is deprecated
- Zombie tables detected upon uninstall: 7 tables
- wp_wpal_stats
- wp_wpal_rules
- wp_wpal_links
- wp_wpal_destinations
- wp_wpal_keywords
- wp_wpal_geoipcountry
- wp_wpal_automatches
- Zombie WordPress options detected upon uninstall: 1 option
- WPAL_Plugin_Options
Smoke tests 0% from 4 tests
Server-side errors 0% from 1 test
🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
These errors were triggered by the plugin
- 31 occurences, only the last one shown
- > GET request to /wp-admin/admin.php?page=wpal-admin-tinymce
- > Deprecated in wp-content/plugins/wp-affiliate-links/controllers/controller/admin.php+89
Function create_function() is deprecated
- 6 occurences, only the last one shown
- > GET request to /wp-admin/admin.php?page=wpal-admin-edit
- > User deprecated in wp-includes/functions.php+5691
contextual_help is deprecated since version 3.3.0! Use get_current_screen()->add_help_tab(), get_current_screen()->remove_help_tab() instead.
SRP 0% 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
The following issues need your attention
- 10× PHP files output non-empty strings when accessed directly via GET requests:
- > /wp-content/plugins/wp-affiliate-links/views/admin/links/index-help.php
- > /wp-content/plugins/wp-affiliate-links/views/admin/keywords/edit-help.php
- > /wp-content/plugins/wp-affiliate-links/views/admin/statistics/index-help.php
- > /wp-content/plugins/wp-affiliate-links/views/admin/edit/index-help.php
- > /wp-content/plugins/wp-affiliate-links/views/admin/settings/index-help.php
- > /wp-content/plugins/wp-affiliate-links/views/admin/statistics/stats-help.php
- > /wp-content/plugins/wp-affiliate-links/views/admin/keywords/index-help.php
- > /wp-content/plugins/wp-affiliate-links/views/admin/home/index-help.php
- > /wp-content/plugins/wp-affiliate-links/views/admin/help/index-help.php
- > /wp-content/plugins/wp-affiliate-links/views/admin/help/index.php
- 43× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
- > PHP Fatal error
Uncaught Error: Using $this when not in object context in wp-content/plugins/wp-affiliate-links/views/admin/edit/destination.php:5
- > PHP Fatal error
Uncaught Error: Class 'WPAL_Controller' not found in wp-content/plugins/wp-affiliate-links/shortcodes/clink.php:6
- > PHP Fatal error
Uncaught Error: Class 'WPAL_Controller_Tinymce' not found in wp-content/plugins/wp-affiliate-links/controllers/admin/tinymce.php:7
- > PHP Fatal error
Uncaught Error: Class 'WPAL_Controller_Admin' not found in wp-content/plugins/wp-affiliate-links/controllers/admin/help.php:7
- > PHP Fatal error
Uncaught Error: Class 'WPAL_Model_List' not found in wp-content/plugins/wp-affiliate-links/models/geoipcountry/list.php:3
- > PHP Fatal error
Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/wp-affiliate-links/plugin.php:19
- > PHP Fatal error
Uncaught Error: Class 'WPAL_Controller' not found in wp-content/plugins/wp-affiliate-links/controllers/controller/admin.php:8
- > PHP Notice
Undefined variable: errors in wp-content/plugins/wp-affiliate-links/views/controller/error.php on line 1
- > PHP Fatal error
Uncaught Error: Class 'WPAL_Controller_Admin' not found in wp-content/plugins/wp-affiliate-links/controllers/admin/edit.php:7
- > PHP Fatal error
Uncaught Error: Class 'WPAL_Controller_Admin' not found in wp-content/plugins/wp-affiliate-links/controllers/admin/settings.php:7
- > PHP Fatal error
User-side errors 0% from 1 test
🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Please fix the following browser errors
- 7 occurences, only the last one shown
- > GET request to /wp-admin/admin.php?page=wpal-admin-tinymce
- > Javascript (severe) in unknown
/wp-content/plugins/wp-affiliate-links/static/js/jquery/jqplot/jquery.jqplot.js?ver=5.9.2 202:39 Uncaught TypeError: Cannot read properties of undefined (reading 'msie')
- 7 occurences, only the last one shown
- > GET request to /wp-admin/admin.php?page=wpal-admin-tinymce
- > Javascript (severe) in unknown
/wp-content/plugins/wp-affiliate-links/static/js/jquery/jqplot/plugins/jqplot.categoryAxisRenderer.js?ver=5.9.2 50:46 Uncaught TypeError: $.jqplot.LinearAxisRenderer is not a constructor
- 7 occurences, only the last one shown
- > GET request to /wp-admin/admin.php?page=wpal-admin-tinymce
- > Javascript (severe) in unknown
/wp-content/plugins/wp-affiliate-links/static/js/jquery/jqplot/plugins/jqplot.dateAxisRenderer.js?ver=5.9.2 98:42 Uncaught TypeError: $.jqplot.LinearAxisRenderer is not a constructor
- 7 occurences, only the last one shown
- > GET request to /wp-admin/admin.php?page=wpal-admin-tinymce
- > Javascript (severe) in unknown
/wp-content/plugins/wp-affiliate-links/static/js/jquery/jqplot/plugins/jqplot.highlighter.js?ver=5.9.2 18:32 Uncaught TypeError: Cannot read properties of undefined (reading 'push')
- 7 occurences, only the last one shown
- > GET request to /wp-admin/admin.php?page=wpal-admin-tinymce
- > Console-api (warning) in unknown
/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,jquery-ui-core&ver=5.9.2 1:31592 "jQuery.Deferred exception: this[binder] is not a function" "TypeError: this[binder] is not a function\n at s.fn.init.$.fn.tipsy (/wp-content/plugins/wp-affiliate-links/static/js/jquery/jquery.tipsy.js?ver=5.9.2:161:25)\n at HTMLDocument.\u003Canonymous> (/wp-content/plugins/wp-affiliate-links/static/js/admin.js?ver=5.9.2:8:14)\n at e (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,jquery-ui-core&ver=5.9.2:2:30038)\n at t (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,jquery-ui-core&ver=5.9.2:2:30340)" undefined
- 7 occurences, only the last one shown
- > GET request to /wp-admin/admin.php?page=wpal-admin-tinymce
- > Javascript (severe) in unknown
/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,jquery-ui-core&ver=5.9.2 1:31702 Uncaught TypeError: this[binder] is not a function
- > GET request to /wp-admin/admin.php?page=wpal-admin-tinymce
- > Javascript (severe) in unknown
/wp-includes/js/tinymce/tiny_mce_popup.js 32:26 Uncaught TypeError: Cannot read properties of undefined (reading 'EditorManager')
- > GET request to /wp-admin/admin.php?page=wpal-admin-tinymce
- > Javascript (severe) in unknown
/wp-includes/js/tinymce/utils/mctabs.js 14:38 Uncaught TypeError: Cannot read properties of undefined (reading 'windowManager')
- > GET request to /wp-admin/admin.php?page=wpal-admin-tinymce
- > Javascript (severe) in unknown
/wp-includes/js/tinymce/utils/form_utils.js 10:39 Uncaught TypeError: Cannot read properties of undefined (reading 'baseURI')
- > GET request to /wp-admin/admin.php?page=wpal-admin-tinymce
- > Javascript (severe) in unknown
/wp-includes/js/tinymce/tiny_mce_popup.js 114:27 Uncaught TypeError: Cannot read properties of undefined (reading 'plugin_url')
Optimizations
Plugin configuration 96% from 29 tests
readme.txt Passed 16 tests
The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
10 plugin tags: url, mask, short, redirect, shortener...
wp-affiliate-links/plugin.php 92% from 13 tests
"WP Affiliate Links" version 0.1.1's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
You should first fix the following items:
- Main file name: The principal plugin file should be the same as the plugin slug ("wp-affiliate-links.php" instead of "plugin.php")
Code Analysis 97% from 3 tests
File types Passed 1 test
🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Everything looks great! No dangerous files found in this plugin14,663 lines of code in 89 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
JavaScript | 13 | 936 | 2,551 | 9,092 |
PHP | 71 | 473 | 899 | 4,691 |
CSS | 5 | 82 | 88 | 880 |
PHP code 50% from 2 tests
An overview of cyclomatic complexity and code structure
These items need your attention
- Method cyclomatic complexity has to be reduced to less than 100 (currently 109)
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.62 |
Average class complexity | 16.85 |
▷ Minimum class complexity | 1.00 |
▷ Maximum class complexity | 135.00 |
Average method complexity | 4.93 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 109.00 |
Code structure | ||
---|---|---|
Namespaces | 0 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 33 | |
▷ Abstract classes | 4 | 12.12% |
▷ Concrete classes | 29 | 87.88% |
▷ Final classes | 1 | 3.45% |
Methods | 134 | |
▷ Static methods | 3 | 2.24% |
▷ Public methods | 121 | 90.30% |
▷ Protected methods | 13 | 9.70% |
▷ Private methods | 0 | 0.00% |
Functions | 15 | |
▷ Named functions | 15 | 100.00% |
▷ Anonymous functions | 0 | 0.00% |
Constants | 15 | |
▷ Global constants | 11 | 73.33% |
▷ Class constants | 4 | 26.67% |
▷ Public constants | 4 | 100.00% |
Plugin size Passed 2 tests
Image compression Passed 2 tests
Often times overlooked, PNG files can occupy unnecessary space in your plugin
22 PNG files occupy 0.39MB with 0.12MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
static/img/wizard-icon-20x20.png | 3.39KB | 0.67KB | ▼ 80.10% |
static/js/jquery/css/smoothness/images/ui-bg_glass_95_fef1ec_1x400.png | 0.12KB | 0.14KB | 0.00% |
screenshot-2.png | 98.92KB | 31.40KB | ▼ 68.26% |
static/js/jquery/css/smoothness/images/ui-icons_cd0a0a_256x240.png | 4.27KB | 4.11KB | ▼ 3.78% |
static/js/jquery/css/smoothness/images/ui-bg_glass_55_fbf9ee_1x400.png | 0.12KB | 0.14KB | 0.00% |