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
Installer ran successfully
Server metrics [RAM: ▼0.02MB] [CPU: ▼315.12ms] Passed 4 tests
A check of server-side resources used by Easy Settings for LearnDash
No issues were detected with server-side resource usage
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.53 ▲0.01 | 53.28 ▼3.55 |
Dashboard /wp-admin | 3.41 ▲0.00 | 33.40 ▲0.92 |
Posts /wp-admin/edit.php | 3.65 ▲0.00 | 36.22 ▲0.24 |
Add New Post /wp-admin/post-new.php | 6.89 ▼0.09 | 92.40 ▼1,257.63 |
Media Library /wp-admin/upload.php | 3.30 ▲0.00 | 24.10 ▲0.48 |
Easy Settings /wp-admin/admin.php?page=learndash-easy-settings | 3.10 | 17.06 |
Server storage [IO: ▲3.66MB] [DB: ▲0.00MB] Passed 3 tests
Filesystem and database footprint
This plugin was installed successfully
Filesystem: 189 new files
Database: no new tables, no new options
Browser metrics Passed 4 tests
This is an overview of browser requirements for Easy Settings for LearnDash
This plugin has a minimal impact on browser resources
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 3,763 ▲9 | 16.13 ▲0.36 | 5.67 ▼0.82 | 2.45 ▲0.18 |
Dashboard /wp-admin | 2,895 ▲37 | 6.17 ▼0.10 | 124.22 ▼10.79 | 159.19 ▲0.80 |
Posts /wp-admin/edit.php | 2,691 ▼3 | 3.24 ▼0.01 | 64.95 ▲4.67 | 140.00 ▲3.07 |
Add New Post /wp-admin/post-new.php | 1,752 ▲91 | 21.29 ▲5.73 | 451.24 ▲12.72 | 158.16 ▲6.85 |
Media Library /wp-admin/upload.php | 1,698 ▲6 | 5.47 ▼0.06 | 143.77 ▲0.54 | 183.36 ▼10.13 |
Easy Settings /wp-admin/admin.php?page=learndash-easy-settings | 28 | 0.94 | 0.04 | 16.70 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests
🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
Uninstall script ran successfully
Smoke tests 25% 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)
Even though everything seems fine, this is not an exhaustive test
SRP 0% from 2 tests
🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Almost there! Just fix the following items
- 2× PHP files perform the task of outputting text when accessed with GET requests:
- > /wp-content/plugins/easy-settings-for-learndash/admin/ld-easy-settings-editor.php
- > /wp-content/plugins/easy-settings-for-learndash/freemius/templates/ajax-loader.php
- 15× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
- > PHP Warning
Invalid argument supplied for foreach() in wp-content/plugins/easy-settings-for-learndash/admin/ld-easy-settings.php on line 3
- > PHP Notice
Undefined variable: VARS in wp-content/plugins/easy-settings-for-learndash/freemius/templates/account/partials/addon.php on line 8
- > PHP Fatal error
Uncaught Error: Call to undefined function freemius() in wp-content/plugins/easy-settings-for-learndash/freemius/templates/partials/network-activation.php:6
- > PHP Notice
Trying to access array offset on value of type null in wp-content/plugins/easy-settings-for-learndash/freemius/templates/account/partials/addon.php on line 6
- > PHP Warning
Use of undefined constant LD_EASY_SETTINGS_ITEMS_EDITORS - assumed 'LD_EASY_SETTINGS_ITEMS_EDITORS' (this will throw an Error in a future version of PHP) in wp-content/plugins/easy-settings-for-learndash/admin/ld-easy-settings-editor.php on line 3
- > PHP Notice
Trying to access array offset on value of type null in wp-content/plugins/easy-settings-for-learndash/freemius/templates/account/partials/addon.php on line 8
- > PHP Notice
Trying to access array offset on value of type null in wp-content/plugins/easy-settings-for-learndash/freemius/templates/account/partials/addon.php on line 7
- > PHP Fatal error
Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/easy-settings-for-learndash/includes/filters.php:3
- > PHP Notice
Undefined variable: VARS in wp-content/plugins/easy-settings-for-learndash/freemius/templates/account/partials/addon.php on line 6
- > PHP Fatal error
Uncaught Error: Call to undefined function settings_fields() in wp-content/plugins/easy-settings-for-learndash/admin/ld-easy-settings-defaults.php:2
- > PHP Warning
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)
Please take a look at the following user-side issues
- > GET request to /wp-admin/admin.php?page=learndash-easy-settings
- > Network (severe)
wp-admin/admin.php?page=learndash-easy-settings - Failed to load resource: the server responded with a status of 403 (Forbidden)
Optimizations
Plugin configuration 93% from 29 tests
readme.txt Passed 16 tests
Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
5 plugin tags: lms, learning, learndash, education, elearning
easy-settings-for-learndash/learndash-easy-settings.php 85% from 13 tests
The principal PHP file in "Easy Settings for LearnDash" v. 1.3.0 is loaded by WordPress automatically on each request
Please take the time to fix the following:
- Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("easy-settings-for-learndash.php" instead of "learndash-easy-settings.php")
- Text Domain: The text domain is optional since WordPress version 4.6; if you do specify it, it must be the same as the plugin slug
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
There were no executable files found in this plugin39,121 lines of code in 145 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 115 | 7,422 | 16,171 | 31,914 |
JSON | 7 | 4 | 0 | 4,550 |
JavaScript | 7 | 150 | 163 | 1,412 |
CSS | 14 | 130 | 62 | 683 |
PO File | 1 | 157 | 162 | 348 |
Markdown | 1 | 68 | 0 | 214 |
PHP code 50% from 2 tests
This is a very shot review of cyclomatic complexity and code structure
Please fix the following
- Cyclomatic complexity of classes has to be reduced to less than 1000 (currently 2,907)
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.62 |
Average class complexity | 90.20 |
▷ Minimum class complexity | 1.00 |
▷ Maximum class complexity | 2,907.00 |
Average method complexity | 4.65 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 86.00 |
Code structure | ||
---|---|---|
Namespaces | 0 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 45 | |
▷ Abstract classes | 2 | 4.44% |
▷ Concrete classes | 43 | 95.56% |
▷ Final classes | 0 | 0.00% |
Methods | 1,132 | |
▷ Static methods | 173 | 15.28% |
▷ Public methods | 792 | 69.96% |
▷ Protected methods | 15 | 1.33% |
▷ Private methods | 325 | 28.71% |
Functions | 155 | |
▷ Named functions | 154 | 99.35% |
▷ Anonymous functions | 1 | 0.65% |
Constants | 133 | |
▷ Global constants | 108 | 81.20% |
▷ Class constants | 25 | 18.80% |
▷ Public constants | 25 | 100.00% |
Plugin size Passed 2 tests
Image compression Passed 2 tests
Often times overlooked, PNG files can occupy unnecessary space in your plugin
3 PNG files occupy 0.02MB with 0.01MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
freemius/assets/img/plugin-icon.png | 9.16KB | 5.26KB | ▼ 42.58% |
freemius/assets/img/theme-icon.png | 10.97KB | 5.78KB | ▼ 47.37% |
freemius/assets/img/easy-settings-for-learndash.png | 3.15KB | 2.85KB | ▼ 9.48% |