Benchmarks
Plugin footprint 40% from 16 tests
Installer 0% from 1 test
🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
You still need to fix the following installer errors
- The plugin cannot be installed
- > Warning in wp-content/plugins/training/inc/tr-db-install-scripts.php+89
count(): Parameter must be an array or an object that implements Countable
Server metrics [RAM: ▲0.02MB] [CPU: ▼6.25ms] Passed 4 tests
This is a short check of server-side resources used by Training - Courses
No issues were detected with server-side resource usage
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.39 ▼0.07 | 27.17 ▼13.99 |
Dashboard /wp-admin | 3.35 ▲0.05 | 45.82 ▼4.29 |
Posts /wp-admin/edit.php | 3.40 ▲0.05 | 46.87 ▼4.02 |
Add New Post /wp-admin/post-new.php | 5.93 ▲0.05 | 86.37 ▼2.70 |
Media Library /wp-admin/upload.php | 3.27 ▲0.05 | 35.23 ▲1.24 |
/wp-admin/admin.php?page=edit_course | 3.42 | 35.63 |
/wp-admin/admin.php?page=add_exercise | 3.29 | 33.99 |
Manage Authors /wp-admin/admin.php?page=manage-authors | 3.32 | 31.48 |
/wp-admin/admin.php?page=add_lesson | 3.28 | 32.77 |
/wp-admin/admin.php?page=progress_detail | 3.38 | 32.62 |
/wp-admin/admin.php?page=module_detail | 3.31 | 32.59 |
/wp-admin/admin.php?page=course_detail | 3.30 | 32.64 |
/wp-admin/admin.php?page=add_module | 3.28 | 32.76 |
Image By Course /wp-admin/admin.php?page=course_images | 3.29 | 28.42 |
/wp-admin/admin.php?page=edit_lesson | 3.30 | 31.12 |
Server storage [IO: ▲2.82MB] [DB: ▲0.02MB] Passed 3 tests
Filesystem and database footprint
The plugin installed successfully
Filesystem: 136 new files
Database: 14 new tables, 7 new options
New tables |
---|
wp_rtr_courses |
wp_rtr_enrollment |
wp_rtr_categories |
wp_rtr_modules |
wp_rtr_project_exercise |
wp_rtr_lessons |
wp_rtr_setting |
wp_rtr_resource_status |
wp_rtr_media |
wp_rtr_projects |
... |
New WordPress options |
---|
can_compress_scripts |
widget_theysaidso_widget |
theysaidso_admin_options |
db_upgraded |
widget_recent-comments |
trainingtoolpage |
widget_recent-posts |
Browser metrics Passed 4 tests
A check of browser resources used by Training - Courses
Normal browser usage
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,912 ▲151 | 14.25 ▼0.34 | 1.61 ▼0.15 | 41.50 ▼2.13 |
Dashboard /wp-admin | 2,299 ▲119 | 5.52 ▼0.16 | 84.55 ▼4.34 | 39.38 ▲0.41 |
Posts /wp-admin/edit.php | 2,204 ▲104 | 2.04 ▲0.01 | 38.24 ▲3.51 | 37.22 ▲0.43 |
Add New Post /wp-admin/post-new.php | 1,602 ▲66 | 23.57 ▲0.37 | 690.91 ▲45.52 | 55.37 ▼1.16 |
Media Library /wp-admin/upload.php | 1,504 ▲110 | 4.20 ▲0.00 | 106.36 ▲11.88 | 46.46 ▲5.65 |
/wp-admin/admin.php?page=edit_course | 876 | 1.33 | 7.37 | 24.49 |
/wp-admin/admin.php?page=add_exercise | 853 | 1.51 | 6.65 | 19.74 |
Manage Authors /wp-admin/admin.php?page=manage-authors | 1,475 | 3.86 | 61.70 | 58.01 |
/wp-admin/admin.php?page=add_lesson | 853 | 1.51 | 6.14 | 20.28 |
/wp-admin/admin.php?page=progress_detail | 1,186 | 2.73 | 50.13 | 33.18 |
/wp-admin/admin.php?page=module_detail | 853 | 1.51 | 6.60 | 22.06 |
/wp-admin/admin.php?page=course_detail | 853 | 1.12 | 6.66 | 19.20 |
/wp-admin/admin.php?page=add_module | 853 | 1.51 | 6.28 | 21.34 |
Image By Course /wp-admin/admin.php?page=course_images | 1,409 | 3.93 | 58.79 | 68.13 |
/wp-admin/admin.php?page=edit_lesson | 853 | 1.51 | 6.30 | 19.69 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.02MB] 50% from 4 tests
🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
Please fix the following items
- The plugin did not uninstall successfully, leaving 14 tables in the database
- wp_rtr_modules
- wp_rtr_resource_list
- wp_rtr_categories
- wp_rtr_project_exercise
- wp_rtr_email_templates
- wp_rtr_resource_status
- wp_rtr_lessons
- wp_rtr_authors
- wp_rtr_lesson_notes
- wp_rtr_setting
- ...
- The uninstall procedure has failed, leaving 7 options in the database
- widget_recent-posts
- db_upgraded
- theysaidso_admin_options
- trainingtoolpage
- widget_theysaidso_widget
- can_compress_scripts
- widget_recent-comments
Smoke tests 25% 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
- > GET request to /wp-admin/admin.php?page=edit_course
- > Deprecated in wp-content/plugins/training/views/menus.php+28
Unparenthesized `a ? b : c ? d : e` is deprecated. Use either `(a ? b : c) ? d : e` or `a ? b : (c ? d : e)`
- 4 occurences, only the last one shown
- > GET request to /wp-admin/admin.php?page=course_images
- > User notice in wp-includes/functions.php+5905
Function wpdb::prepare was called incorrectly. The query argument of wpdb::prepare() must have a placeholder. Please see Debugging in WordPress for more information. (This message was added in version 3.9.0.)
- 4 occurences, only the last one shown
- > GET request to /wp-admin/admin.php?page=course_images
- > User notice in wp-includes/functions.php+5905
Function wpdb::prepare was called incorrectly. The query does not contain the correct number of placeholders (0) for the number of arguments passed (1). Please see Debugging in WordPress for more information. (This message was added in version 4.8.3.)
SRP 0% from 2 tests
🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please fix the following items
- 1× PHP files output text when accessed directly:
- > /wp-content/plugins/training/email-templates/templates.php
- 6× GET requests to PHP files have triggered server-side errors or warnings:
- > PHP Fatal error
Uncaught Error: Call to a member function get_results() on null in wp-content/plugins/training/views/tmpl/rtr-tmpl-load-categories.php:2
- > PHP Notice
Undefined variable: wpdb in wp-content/plugins/training/views/tmpl/rtr-tmpl-load-authors.php on line 3
- > PHP Fatal error
Uncaught Error: Call to undefined function wp_get_current_user() in wp-content/plugins/training/views/tmpl/rtr-tmpl-load-front-courses.php:5
- > PHP Fatal error
Uncaught Error: Call to undefined function get_header() in wp-content/plugins/training/views/front-trining-template.php:12
- > PHP Notice
Undefined variable: wpdb in wp-content/plugins/training/views/tmpl/rtr-tmpl-load-categories.php on line 2
- > PHP Fatal error
Uncaught Error: Call to a member function get_results() on null in wp-content/plugins/training/views/tmpl/rtr-tmpl-load-authors.php:3
- > PHP Fatal error
User-side errors Passed 1 test
🔹 Test weight: 20 | This is a shallow check for browser errors
There were no browser issues found
Optimizations
Plugin configuration 93% from 29 tests
readme.txt Passed 16 tests
It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
8 plugin tags: sell courses, e-learning, udemy clone, online courses, lms...
training/wp-training.php 85% from 13 tests
The primary PHP file in "Training - Courses" version 1.3 is used by WordPress to initiate all plugin functionality
The following require your attention:
- Main file name: Name the main plugin file the same as the plugin slug ("training.php" instead of "wp-training.php")
- Description: Keep the plugin description shorter than 140 characters (currently 238 characters long)
Code Analysis Passed 3 tests
File types Passed 1 test
🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Success! There were no dangerous files found in this plugin21,491 lines of code in 61 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 46 | 1,587 | 428 | 9,582 |
JavaScript | 6 | 2,057 | 6,140 | 9,291 |
CSS | 6 | 290 | 82 | 1,869 |
SVG | 3 | 0 | 0 | 749 |
PHP code Passed 2 tests
Cyclomatic complexity and code structure are the fingerprint of this plugin
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.36 |
Average class complexity | 16.67 |
▷ Minimum class complexity | 16.00 |
▷ Maximum class complexity | 17.00 |
Average method complexity | 3.24 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 13.00 |
Code structure | ||
---|---|---|
Namespaces | 0 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 3 | |
▷ Abstract classes | 0 | 0.00% |
▷ Concrete classes | 3 | 100.00% |
▷ Final classes | 2 | 66.67% |
Methods | 21 | |
▷ Static methods | 5 | 23.81% |
▷ Public methods | 18 | 85.71% |
▷ Protected methods | 0 | 0.00% |
▷ Private methods | 3 | 14.29% |
Functions | 76 | |
▷ Named functions | 76 | 100.00% |
▷ Anonymous functions | 0 | 0.00% |
Constants | 9 | |
▷ Global constants | 9 | 100.00% |
▷ Class constants | 0 | 0.00% |
▷ Public constants | 0 | 0.00% |
Plugin size Passed 2 tests
Image compression Passed 2 tests
PNG files should be compressed to save space and minimize bandwidth usage
42 PNG files occupy 0.37MB with 0.13MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
assets/images/off.png | 9.65KB | 5.34KB | ▼ 44.65% |
assets/css/images/ui-icons_777777_256x240.png | 6.83KB | 4.17KB | ▼ 38.92% |
assets/css/images/help.png | 18.09KB | 0.48KB | ▼ 97.33% |
assets/img/linkedin.png | 0.66KB | 0.69KB | 0.00% |
assets/css/chosen-sprite.png | 0.53KB | 0.88KB | 0.00% |