Benchmarks
Plugin footprint 83% from 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | Checking the installer triggered no errors
This plugin's installer ran successfully
Server metrics [RAM: ▲0.07MB] [CPU: ▼6.00ms] Passed 4 tests
This is a short check of server-side resources used by Wordpress Moodle
Server-side resource usage in normal parameters
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.53 ▲0.07 | 37.09 ▼0.84 |
Dashboard /wp-admin | 3.38 ▲0.08 | 47.49 ▼4.55 |
Posts /wp-admin/edit.php | 3.49 ▲0.14 | 47.37 ▼1.35 |
Add New Post /wp-admin/post-new.php | 5.96 ▲0.07 | 86.03 ▼17.25 |
Media Library /wp-admin/upload.php | 3.30 ▲0.08 | 37.91 ▲1.95 |
Add New /wp-admin/post-new.php?post_type=wp_moodle_courses | 3.42 | 51.02 |
Sync Moodle Courses /wp-admin/admin.php?page=sync_moodle_courses_handle | 3.25 | 30.52 |
Moodle Courses /wp-admin/admin.php?page=moodle_courses_handle | 3.25 | 30.36 |
Wp Moodle /wp-admin/admin.php?page=wp_moodle_handler | 3.27 | 31.32 |
Test Moodle API /wp-admin/admin.php?page=moodle_test_api_handle | 3.25 | 32.81 |
Moodle Courses /wp-admin/edit.php?post_type=wp_moodle_courses | 3.35 | 36.92 |
Server storage [IO: ▲0.17MB] [DB: ▲0.00MB] Passed 3 tests
How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 11 new files
Database: no new tables, 6 new options
New WordPress options |
---|
widget_recent-posts |
widget_theysaidso_widget |
db_upgraded |
widget_recent-comments |
theysaidso_admin_options |
can_compress_scripts |
Browser metrics Passed 4 tests
An overview of browser requirements for Wordpress Moodle
Minimal impact on browser resources
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,867 ▲121 | 13.37 ▼0.94 | 1.68 ▲0.01 | 38.83 ▲1.18 |
Dashboard /wp-admin | 2,256 ▲67 | 4.99 ▲0.05 | 102.18 ▼11.18 | 81.09 ▲41.09 |
Posts /wp-admin/edit.php | 2,151 ▲62 | 2.24 ▲0.18 | 35.42 ▼11.82 | 34.85 ▼10.14 |
Add New Post /wp-admin/post-new.php | 1,721 ▲178 | 22.55 ▲4.41 | 707.29 ▲80.33 | 36.77 ▼32.37 |
Media Library /wp-admin/upload.php | 1,450 ▲62 | 4.55 ▲0.33 | 109.17 ▲10.41 | 52.18 ▲4.74 |
Add New /wp-admin/post-new.php?post_type=wp_moodle_courses | 2,203 | 7.74 | 176.51 | 143.19 |
Sync Moodle Courses /wp-admin/admin.php?page=sync_moodle_courses_handle | 832 | 1.81 | 27.62 | 25.44 |
Moodle Courses /wp-admin/admin.php?page=moodle_courses_handle | 881 | 1.79 | 28.90 | 23.89 |
Wp Moodle /wp-admin/admin.php?page=wp_moodle_handler | 907 | 1.79 | 32.72 | 36.31 |
Test Moodle API /wp-admin/admin.php?page=moodle_test_api_handle | 869 | 1.78 | 30.79 | 25.81 |
Moodle Courses /wp-admin/edit.php?post_type=wp_moodle_courses | 1,124 | 2.22 | 36.37 | 33.13 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 75% from 4 tests
🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
These items require your attention
- Zombie WordPress options detected upon uninstall: 6 options
- widget_recent-comments
- db_upgraded
- widget_recent-posts
- widget_theysaidso_widget
- can_compress_scripts
- theysaidso_admin_options
Smoke tests 75% from 4 tests
Server-side errors 0% from 1 test
🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Almost there, just fix the following server-side errors
- 3 occurences, only the last one shown
- > GET request to /wp-admin/admin.php?page=moodle_test_api_handle
- > Warning in wp-content/plugins/wp-moodle/wp_moodle.php+271
file_get_contents(/webservice/rest/server.php?wstoken=&wsfunction=core_course_get_courses&moodlewsrestformat=json): failed to open stream: No such file or directory
SRP Passed 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
Everything seems fine, however this is by no means an exhaustive test
User-side errors Passed 1 test
🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser errors were detected
Optimizations
Plugin configuration 93% from 29 tests
readme.txt Passed 16 tests
The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
9 plugin tags: moodle web api, moodle webservices, moodle restful webservices, show moodle course post, moodle user resgiter...
wp-moodle/wp_moodle.php 85% from 13 tests
The entry point to "Wordpress Moodle" version 2... is a PHP file that has certain tags in its header comment area
Please make the necessary changes and fix the following:
- Main file name: It is recommended to name the main PHP file as the plugin slug ("wp-moodle.php" instead of "wp_moodle.php")
- Version: Plugin version number should only contain digits separated by dots (ex. "1.0.3" instead of "2...")
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 detected323 lines of code in 9 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 4 | 104 | 16 | 304 |
CSS | 3 | 0 | 5 | 16 |
JavaScript | 2 | 0 | 5 | 3 |
PHP code Passed 2 tests
Analyzing logical lines of code, cyclomatic complexity, and other code metrics
All good! No complexity issues found
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.23 |
Average class complexity | 11.00 |
▷ Minimum class complexity | 11.00 |
▷ Maximum class complexity | 11.00 |
Average method complexity | 1.62 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 6.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 | 16 | |
▷ Static methods | 0 | 0.00% |
▷ Public methods | 15 | 93.75% |
▷ Protected methods | 0 | 0.00% |
▷ Private methods | 1 | 6.25% |
Functions | 0 | |
▷ Named functions | 0 | 0.00% |
▷ Anonymous functions | 0 | 0.00% |
Constants | 5 | |
▷ Global constants | 5 | 100.00% |
▷ Class constants | 0 | 0.00% |
▷ Public constants | 0 | 0.00% |
Plugin size Passed 2 tests
Image compression Passed 2 tests
Using a strong compression for your PNG files is a great way to speed-up your plugin
1 compressed PNG file occupies 0.00MB
Potential savings
Compression of 1 random PNG file using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
assets/image/icon.png | 0.92KB | 1.00KB | 0.00% |