Benchmarks
Plugin footprint 83% from 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
This plugin's installer ran successfully
Server metrics [RAM: ▲1.41MB] [CPU: ▲17.72ms] Passed 4 tests
A check of server-side resources used by Planaday API
Server-side resource usage in normal parameters
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 4.99 ▲1.53 | 56.90 ▲15.34 |
Dashboard /wp-admin | 4.72 ▲1.42 | 105.39 ▲57.40 |
Posts /wp-admin/edit.php | 4.76 ▲1.40 | 65.23 ▲15.96 |
Add New Post /wp-admin/post-new.php | 7.30 ▲1.42 | 110.17 ▲18.11 |
Media Library /wp-admin/upload.php | 4.63 ▲1.40 | 58.21 ▲21.45 |
CSS /wp-admin/admin.php?page=planaday-api-css | 4.53 | 48.33 |
Welkom /wp-admin/admin.php?page=planaday-api | 4.51 | 54.51 |
Instellingen /wp-admin/admin.php?page=planaday-api-general | 4.65 | 49.79 |
Server storage [IO: ▲5.23MB] [DB: ▲0.00MB] Passed 3 tests
Filesystem and database footprint
The plugin installed successfully
Filesystem: 99 new files
Database: no new tables, 9 new options
New WordPress options |
---|
widget_theysaidso_widget |
widget_widget_cursusdetails |
can_compress_scripts |
widget_widget_search |
widget_recent-comments |
theysaidso_admin_options |
db_upgraded |
planaday-api-version |
widget_recent-posts |
Browser metrics Passed 4 tests
A check of browser resources used by Planaday API
There were no issues detected in relation to browser resource usage
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 3,293 ▲531 | 17.77 ▲3.51 | 8.48 ▲6.79 | 38.88 ▼4.54 |
Dashboard /wp-admin | 2,343 ▲166 | 7.40 ▲1.78 | 155.72 ▲63.87 | 46.92 ▲6.63 |
Posts /wp-admin/edit.php | 2,256 ▲156 | 4.80 ▲2.83 | 118.10 ▲78.97 | 46.06 ▲7.53 |
Add New Post /wp-admin/post-new.php | 1,668 ▲142 | 21.49 ▼1.54 | 577.38 ▼99.87 | 98.12 ▲45.86 |
Media Library /wp-admin/upload.php | 1,551 ▲151 | 6.67 ▲2.47 | 159.36 ▲58.89 | 48.40 ▲8.53 |
CSS /wp-admin/admin.php?page=planaday-api-css | 1,142 | 4.77 | 94.08 | 48.98 |
Welkom /wp-admin/admin.php?page=planaday-api | 1,041 | 4.39 | 45.87 | 39.53 |
Instellingen /wp-admin/admin.php?page=planaday-api-general | 2,095 | 8.64 | 235.00 | 159.31 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 75% from 4 tests
🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
- This plugin did not uninstall successfully, leaving 9 options in the database
- can_compress_scripts
- widget_theysaidso_widget
- widget_recent-posts
- widget_widget_search
- db_upgraded
- theysaidso_admin_options
- planaday-api-version
- widget_recent-comments
- widget_widget_cursusdetails
Smoke tests 50% from 4 tests
Server-side errors 0% from 1 test
🔹 Test weight: 20 | A smoke test targeting server-side errors
Almost there, just fix the following server-side errors
- > GET request to /wp-admin/admin.php?page=planaday-api
- > Notice in wp-content/plugins/planaday-api/src/api/classes/settings.php+88
Trying to access array offset on value of type bool
- > GET request to /wp-admin/admin.php?page=planaday-api-general
- > Notice in wp-content/plugins/planaday-api/src/api/classes/settings/settings_general.php+515
Undefined index: bedankurlmislukt
- > GET request to /wp-admin/admin.php?page=planaday-api-general
- > Notice in wp-content/plugins/planaday-api/src/api/classes/settings/settings_general.php+566
Undefined index: mailcursusaanmelding
- 2 occurences, only the last one shown
- > GET request to /wp-admin/admin.php?page=planaday-api-general
- > Notice in wp-content/plugins/planaday-api/src/api/classes/settings/settings_general.php+584
Undefined index: dagdelentekst
- 3 occurences, only the last one shown
- > GET request to /wp-admin/admin.php?page=planaday-api-general
- > Notice in wp-content/plugins/planaday-api/src/api/classes/settings/settings_general.php+603
Undefined index: toonomschrijvingcursus
- 3 occurences, only the last one shown
- > GET request to /wp-admin/admin.php?page=planaday-api-general
- > Notice in wp-content/plugins/planaday-api/src/api/classes/settings/settings_general.php+626
Undefined index: toondebuginfo
- 3 occurences, only the last one shown
- > GET request to /wp-admin/admin.php?page=planaday-api-general
- > Notice in wp-content/plugins/planaday-api/src/api/classes/settings/settings_general.php+645
Undefined index: betalingenactief
SRP 50% 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
The following issues need your attention
- 18× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
- > PHP Fatal error
Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/planaday-api/src/api/classes/widget/widget_cursusdetails.php:3
- > PHP Fatal error
Uncaught Error: Class 'shortcodes' not found in wp-content/plugins/planaday-api/src/api/classes/shortcodes/shortcodes_courselistlist.php:4
- > PHP Fatal error
Uncaught Error: Class 'shortcodes' not found in wp-content/plugins/planaday-api/src/api/classes/payment.php:3
- > PHP Fatal error
Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/planaday-api/src/includes/widget.php:3
- > PHP Fatal error
Uncaught Error: Class 'shortcodes' not found in wp-content/plugins/planaday-api/src/api/classes/shortcodes/shortcodes_courselistblock.php:3
- > PHP Fatal error
Uncaught Error: Class 'settings' not found in wp-content/plugins/planaday-api/src/api/classes/settings/settings_support.php:3
- > PHP Fatal error
Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/planaday-api/src/api/classes/widget/widget_search.php:3
- > PHP Fatal error
Uncaught Error: Class 'shortcodes' not found in wp-content/plugins/planaday-api/src/api/classes/shortcodes/shortcodes_courselisttable.php:3
- > PHP Fatal error
Uncaught Error: Class 'shortcodes' not found in wp-content/plugins/planaday-api/src/api/classes/shortcodes/shortcodes_courselistblock2.php:3
- > PHP Fatal error
Uncaught Error: Class 'shortcodes' not found in wp-content/plugins/planaday-api/src/api/classes/shortcodes/shortcodes_course.php:3
- > PHP Fatal error
User-side errors Passed 1 test
🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser issues were found
Optimizations
Plugin configuration 87% from 29 tests
readme.txt 88% from 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
These attributes need to be fixed:
- Requires at least: Invalid version format
- Donate link: Please fix this invalid url: "n/a"
planaday-api/index.php 85% from 13 tests
The main PHP script in "Planaday API" version 10.5 is automatically included on every request by WordPress
It is important to fix the following:
- Description: Please don't use more than 140 characters for the plugin description (currently 179 characters long)
- Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("planaday-api.php" instead of "index.php")
Code Analysis 97% from 3 tests
File types Passed 1 test
🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Everything looks great! No dangerous files found in this plugin38,772 lines of code in 72 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
JavaScript | 11 | 2,800 | 3,602 | 15,217 |
PHP | 33 | 1,054 | 271 | 8,647 |
CSS | 7 | 83 | 61 | 6,874 |
LESS | 18 | 502 | 55 | 4,107 |
SVG | 3 | 0 | 0 | 3,927 |
PHP code 50% from 2 tests
A brief analysis of cyclomatic complexity and code structure for this plugin
Please fix the following
- Method cyclomatic complexity has to be reduced to less than 100 (currently 198)
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.58 |
Average class complexity | 60.22 |
▷ Minimum class complexity | 5.00 |
▷ Maximum class complexity | 349.00 |
Average method complexity | 10.93 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 198.00 |
Code structure | ||
---|---|---|
Namespaces | 0 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 27 | |
▷ Abstract classes | 0 | 0.00% |
▷ Concrete classes | 27 | 100.00% |
▷ Final classes | 0 | 0.00% |
Methods | 161 | |
▷ Static methods | 51 | 31.68% |
▷ Public methods | 154 | 95.65% |
▷ Protected methods | 1 | 0.62% |
▷ Private methods | 6 | 3.73% |
Functions | 24 | |
▷ Named functions | 24 | 100.00% |
▷ Anonymous functions | 0 | 0.00% |
Constants | 3 | |
▷ Global constants | 1 | 33.33% |
▷ Class constants | 2 | 66.67% |
▷ Public constants | 2 | 100.00% |
Plugin size 50% from 2 tests
Image compression 50% from 2 tests
PNG files should be compressed to save space and minimize bandwidth usage
10 PNG files occupy 0.51MB with 0.19MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
assets/screenshot-3.png | 30.23KB | 12.00KB | ▼ 60.32% |
assets/plugin.png | 1.41KB | 1.21KB | ▼ 13.80% |
assets/check-ok.png | 8.89KB | 4.09KB | ▼ 53.93% |
assets/check-info.png | 1.42KB | 1.35KB | ▼ 4.82% |
assets/check-nok.png | 9.66KB | 4.56KB | ▼ 52.78% |