Benchmarks
Plugin footprint Passed 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Install script ran successfully
Server metrics [RAM: ▲0.01MB] [CPU: ▼302.63ms] Passed 4 tests
Server-side resources used by 2Performant Link2 - Automatic affiliate links
This plugin has minimal impact on server resources
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.58 ▲0.06 | 54.57 ▲5.42 |
Dashboard /wp-admin | 3.45 ▲0.04 | 33.79 ▲1.83 |
Posts /wp-admin/edit.php | 3.67 ▲0.03 | 38.14 ▼18.71 |
Add New Post /wp-admin/post-new.php | 6.91 ▼0.06 | 91.39 ▼1,194.52 |
Media Library /wp-admin/upload.php | 3.32 ▲0.03 | 24.11 ▲0.90 |
2Performant Link2 /wp-admin/options-general.php?page=2performant-link2 | 3.30 | 22.66 |
Server storage [IO: ▲0.01MB] [DB: ▲0.00MB] Passed 3 tests
A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 4 new files
Database: no new tables, no new options
Browser metrics Passed 4 tests
Checking browser requirements for 2Performant Link2 - Automatic affiliate links
This plugin renders optimally with no browser resource issues detected
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 3,827 ▲83 | 16.25 ▲0.62 | 5.56 ▼0.07 | 2.21 ▼0.33 |
Dashboard /wp-admin | 2,921 ▲63 | 6.15 ▼0.03 | 116.38 ▼17.66 | 154.43 ▼0.04 |
Posts /wp-admin/edit.php | 2,718 ▲30 | 3.25 ▲0.01 | 68.23 ▲5.26 | 135.22 ▼7.51 |
Add New Post /wp-admin/post-new.php | 1,690 ▲29 | 18.43 ▲1.96 | 395.11 ▼3.43 | 151.31 ▼0.28 |
Media Library /wp-admin/upload.php | 1,733 ▲38 | 5.63 ▲0.11 | 137.69 ▼11.67 | 189.50 ▼8.11 |
2Performant Link2 /wp-admin/options-general.php?page=2performant-link2 | 1,139 | 2.38 | 55.82 | 111.70 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests
🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Uninstaller ran successfully
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)
Good news, no errors were detected
SRP 50% 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
- 3× PHP files trigger server errors when accessed directly:
- > PHP Fatal error
Uncaught Error: Using $this when not in object context in wp-content/plugins/2performant-link2/views/settings.php:7
- > PHP Fatal error
Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/2performant-link2/link2.php:19
- > PHP Fatal error
Uncaught Error: Using $this when not in object context in wp-content/plugins/2performant-link2/views/dashboard-notices.php:1
- > PHP Fatal error
User-side errors Passed 1 test
🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side
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
6 plugin tags: link2, affiliate, script, affiliate marketing, tool...
2performant-link2/link2.php 92% from 13 tests
This is the main PHP file of "2Performant Link2 - Automatic affiliate links" version 1.0.1, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
Please take the time to fix the following:
- Main file name: Name the main plugin file the same as the plugin slug ("2performant-link2.php" instead of "link2.php")
Code Analysis Passed 3 tests
File types Passed 1 test
🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
No dangerous file extensions were detected154 lines of code in 3 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 3 | 28 | 8 | 154 |
PHP code Passed 2 tests
Cyclomatic complexity and code structure are the fingerprint of this plugin
This plugin has no cyclomatic complexity problems
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.33 |
Average class complexity | 16.00 |
▷ Minimum class complexity | 16.00 |
▷ Maximum class complexity | 16.00 |
Average method complexity | 2.12 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 5.00 |
Code structure | ||
---|---|---|
Namespaces | 0 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 1 | |
▷ Abstract classes | 0 | 0.00% |
▷ Concrete classes | 1 | 100.00% |
▷ Final classes | 0 | 0.00% |
Methods | 9 | |
▷ Static methods | 0 | 0.00% |
▷ Public methods | 9 | 100.00% |
▷ Protected methods | 0 | 0.00% |
▷ Private methods | 0 | 0.00% |
Functions | 0 | |
▷ Named functions | 0 | 0.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
It is recommended to compress PNG files in your plugin to minimize bandwidth usage
There are no PNG files in this plugin