Benchmarks
Plugin footprint 65% from 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed gracefully, with no errors
Server metrics [RAM: ▲0.90MB] [CPU: ▲0.38ms] Passed 4 tests
Server-side resources used by TrainingPress
No issues were detected with server-side resource usage
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 4.37 ▲0.91 | 49.18 ▲9.85 |
Dashboard /wp-admin | 4.20 ▲0.89 | 48.65 ▲2.89 |
Posts /wp-admin/edit.php | 4.25 ▲0.89 | 52.75 ▲2.68 |
Add New Post /wp-admin/post-new.php | 6.82 ▲0.93 | 93.97 ▼11.29 |
Media Library /wp-admin/upload.php | 4.12 ▲0.89 | 39.90 ▲7.26 |
Chapters /wp-admin/edit.php?post_type=chapters | 4.13 | 37.48 |
User Progress /wp-admin/admin.php?page=user-progress | 4.04 | 34.65 |
Settings /wp-admin/admin.php?page=training-settings | 4.12 | 41.02 |
Courses /wp-admin/edit.php?post_type=training | 4.17 | 44.16 |
Modules /wp-admin/edit.php?post_type=modules | 4.13 | 36.74 |
Exercises /wp-admin/edit.php?post_type=exercises | 4.13 | 35.34 |
View Progress /wp-admin/admin.php?page=view-progress | 4.00 | 36.29 |
Server storage [IO: ▲7.81MB] [DB: ▲0.01MB] Passed 3 tests
Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 133 new files
Database: 5 new tables, 8 new options
New tables |
---|
wp_rd_user_course_progress |
wp_rd_user_uploaded_files |
wp_rd_course_exercise_sequence |
wp_rd_user_course_enroll |
wp_rd_user_exercise_progress |
New WordPress options |
---|
can_compress_scripts |
widget_recent-posts |
db_upgraded |
widget_recent-comments |
rdtr_training_plugin_status |
theysaidso_admin_options |
widget_theysaidso_widget |
wpl_training_course_image |
Browser metrics Passed 4 tests
TrainingPress: an overview of browser usage
There were no issues detected in relation to browser resource usage
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,973 ▲227 | 15.84 ▲1.16 | 2.03 ▲0.22 | 45.03 ▲3.25 |
Dashboard /wp-admin | 2,307 ▲122 | 6.49 ▲0.63 | 129.38 ▲24.50 | 40.79 ▼4.37 |
Posts /wp-admin/edit.php | 2,213 ▲124 | 3.81 ▲1.79 | 54.61 ▲10.83 | 36.28 ▲1.72 |
Add New Post /wp-admin/post-new.php | 1,622 ▲108 | 24.31 ▲6.76 | 652.38 ▼1.45 | 40.48 ▼11.60 |
Media Library /wp-admin/upload.php | 1,504 ▲122 | 5.24 ▲1.07 | 112.24 ▲12.71 | 42.94 ▲2.16 |
Chapters /wp-admin/edit.php?post_type=chapters | 1,200 | 3.54 | 51.29 | 30.29 |
User Progress /wp-admin/admin.php?page=user-progress | 900 | 3.25 | 37.51 | 24.12 |
Settings /wp-admin/admin.php?page=training-settings | 1,209 | 4.76 | 53.79 | 87.22 |
Courses /wp-admin/edit.php?post_type=training | 1,253 | 3.73 | 46.37 | 30.77 |
Modules /wp-admin/edit.php?post_type=modules | 1,202 | 3.55 | 46.23 | 32.47 |
Exercises /wp-admin/edit.php?post_type=exercises | 1,183 | 3.56 | 50.14 | 33.43 |
View Progress /wp-admin/admin.php?page=view-progress | 1,010 | 3.28 | 39.67 | 26.37 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.01MB] 50% from 4 tests
🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
The following items require your attention
- Zombie tables detected upon uninstall: 5 tables
- wp_rd_course_exercise_sequence
- wp_rd_user_course_progress
- wp_rd_user_uploaded_files
- wp_rd_user_course_enroll
- wp_rd_user_exercise_progress
- This plugin did not uninstall successfully, leaving 7 options in the database
- widget_recent-posts
- widget_recent-comments
- widget_theysaidso_widget
- theysaidso_admin_options
- db_upgraded
- can_compress_scripts
- wpl_training_course_image
Smoke tests 25% from 4 tests
Server-side errors 0% from 1 test
🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
These errors were triggered by the plugin
- 6 occurences, only the last one shown
- > GET request to /wp-admin/edit.php?post_type=exercises
- > Notice in wp-content/plugins/trainingpress/admin/class-rdtr-admin.php+1941
Trying to get property 'post_title' of non-object
- > GET request to /wp-admin/admin.php?page=view-progress
- > Notice in wp-content/plugins/trainingpress/admin/class-rdtr-view-progress.php+400
Trying to access array offset on value of type null
- 2 occurences, only the last one shown
- > GET request to /wp-admin/admin.php?page=view-progress
- > Notice in wp-content/plugins/trainingpress/admin/class-rdtr-view-progress.php+37
Trying to get property 'display_name' of non-object
SRP 0% 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
Please fix the following items
- 2× PHP files output text when accessed directly:
- > /wp-content/plugins/trainingpress/public/partials/rdtr-course.php
- > /wp-content/plugins/trainingpress/admin/file/dummy.php
- 17× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
- > PHP Notice
Undefined variable: course_name in wp-content/plugins/trainingpress/admin/partials/tmpl/tmpl-users-progress.php on line 2
- > PHP Fatal error
Uncaught Error: Call to undefined function get_the_title() in wp-content/plugins/trainingpress/admin/partials/rdtr-course-progress.php:4
- > PHP Warning
Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/trainingpress/admin/class-rdtr-user-progress.php on line 3
- > PHP Fatal error
Uncaught Error: Call to a member function get_var() on null in wp-content/plugins/trainingpress/admin/partials/tmpl/tmpl-users-enrolled.php:7
- > PHP Notice
Undefined variable: course_name in wp-content/plugins/trainingpress/admin/partials/tmpl/tmpl-users-enrolled.php on line 5
- > PHP Notice
Undefined variable: wpdb in wp-content/plugins/trainingpress/admin/partials/tmpl/tmpl-users-enrolled.php on line 7
- > PHP Notice
Undefined variable: wpdb in wp-content/plugins/trainingpress/admin/partials/tmpl/tmpl-users-progress.php on line 4
- > PHP Fatal error
Uncaught Error: Call to a member function get_results() on null in wp-content/plugins/trainingpress/admin/partials/tmpl/tmpl-users-progress.php:4
- > PHP Warning
Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/trainingpress/admin/class-rdtr-view-progress.php on line 3
- > PHP Fatal error
Uncaught Error: Using $this when not in object context in wp-content/plugins/trainingpress/public/templates/tmpl/rdtr-load-course-detail-left-sidebar.php:9
- > PHP Notice
User-side errors Passed 1 test
🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test
Optimizations
Plugin configuration 90% from 29 tests
readme.txt Passed 16 tests
Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
4 plugin tags: training, e-learning, courses, online training
trainingpress/rdtr.php 77% from 13 tests
The main file in "TrainingPress" v. 1.0.1 serves as a complement to information provided in readme.txt and as the entry point to the plugin
You should first fix the following items:
- Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 248 characters long)
- Text Domain: If you choose to specify the text domain, it must be the same as the plugin slug; optional since WordPress version 4.6
- Main file name: Please rename the main PHP file in this plugin to the plugin slug ("trainingpress.php" instead of "rdtr.php")
Code Analysis Passed 3 tests
File types Passed 1 test
🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Good job! No executable or dangerous file extensions detected44,160 lines of code in 73 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
SVG | 14 | 26 | 9 | 16,177 |
CSS | 13 | 3,668 | 288 | 14,074 |
JavaScript | 12 | 2,185 | 338 | 7,068 |
PHP | 29 | 1,330 | 989 | 6,412 |
Sass | 2 | 27 | 5 | 262 |
LESS | 1 | 11 | 5 | 152 |
Ruby | 1 | 2 | 0 | 8 |
Markdown | 1 | 2 | 0 | 7 |
PHP code Passed 2 tests
This plugin's cyclomatic complexity and code structure detailed below
This plugin has no cyclomatic complexity problems
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.38 |
Average class complexity | 50.50 |
▷ Minimum class complexity | 1.00 |
▷ Maximum class complexity | 374.00 |
Average method complexity | 4.64 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 95.00 |
Code structure | ||
---|---|---|
Namespaces | 0 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 12 | |
▷ Abstract classes | 0 | 0.00% |
▷ Concrete classes | 12 | 100.00% |
▷ Final classes | 0 | 0.00% |
Methods | 163 | |
▷ Static methods | 0 | 0.00% |
▷ Public methods | 153 | 93.87% |
▷ Protected methods | 0 | 0.00% |
▷ Private methods | 10 | 6.13% |
Functions | 4 | |
▷ Named functions | 4 | 100.00% |
▷ Anonymous functions | 0 | 0.00% |
Constants | 7 | |
▷ Global constants | 7 | 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
4 PNG files occupy 0.09MB with 0.02MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
assets/images/sort_both.png | 0.20KB | 0.29KB | 0.00% |
assets/images/no-image.png | 10.97KB | 6.62KB | ▼ 39.60% |
public/img/dummy-auther.png | 77.80KB | 29.55KB | ▼ 62.02% |
assets/images/sort_asc.png | 0.16KB | 0.25KB | 0.00% |