Benchmarks
Plugin footprint 22% 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
The following installer errors require your attention
- The plugin cannot be installed
- > User deprecated in wp-includes/functions.php+5453
Function get_page_by_title is deprecated since version 6.2.0! Use WP_Query instead.
Server metrics [RAM: ▼0.88MB] [CPU: ▼47.18ms] Passed 4 tests
A check of server-side resources used by TalentLMS WordPress plugin
No issues were detected with server-side resource usage
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.12 ▼0.34 | 11.11 ▼27.49 |
Dashboard /wp-admin | 3.14 ▼0.21 | 13.36 ▼47.78 |
Posts /wp-admin/edit.php | 3.14 ▼0.22 | 16.74 ▼33.66 |
Add New Post /wp-admin/post-new.php | 3.14 ▼2.75 | 13.40 ▼79.80 |
Media Library /wp-admin/upload.php | 3.14 ▼0.09 | 14.86 ▼26.51 |
CSS /wp-admin/admin.php?page=talentlms-css | 3.14 | 15.05 |
Integrations /wp-admin/admin.php?page=talentlms-integrations | 3.14 | 13.21 |
Setup /wp-admin/admin.php?page=talentlms-setup | 3.14 | 13.73 |
Dashboard /wp-admin/admin.php?page=talentlms | 3.14 | 13.54 |
Server storage [IO: ▲39.63MB] [DB: ▲0.01MB] 67% from 3 tests
Filesystem and database footprint
It is recommended to fix the following issues
- The filesystem usage should be lower than 25MB (currently using 39.63MB)
Filesystem: 3,154 new files
Database: 4 new tables, 14 new options
New tables |
---|
wp_talentlms_categories |
wp_talentlms_products |
wp_talentlms_products_categories |
wp_talentlms_courses |
New WordPress options |
---|
widget_recent-posts |
tlms-enroll-user-to-courses |
widget_theysaidso_widget |
tlms-woocommerce-active |
widget_tlms_widget |
tlms-apikey |
tlms_courses_page_title |
tlms-domain |
theysaidso_admin_options |
db_upgraded |
... |
Browser metrics Passed 4 tests
TalentLMS WordPress plugin: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,986 ▲240 | 17.06 ▲2.74 | 32.92 ▲31.11 | 40.70 ▼2.91 |
Dashboard /wp-admin | 2,256 ▲68 | 8.79 ▲3.00 | 127.01 ▲12.96 | 39.76 ▼4.30 |
Posts /wp-admin/edit.php | 2,108 ▲19 | 5.16 ▲3.10 | 75.94 ▲39.12 | 33.75 ▼0.63 |
Add New Post /wp-admin/post-new.php | 1,564 ▲50 | 25.17 ▲7.80 | 681.74 ▲4.26 | 33.77 ▼19.32 |
Media Library /wp-admin/upload.php | 1,447 ▲56 | 7.11 ▲2.92 | 127.32 ▲31.62 | 44.73 ▼0.03 |
CSS /wp-admin/admin.php?page=talentlms-css | 846 | 4.99 | 59.08 | 37.54 |
Integrations /wp-admin/admin.php?page=talentlms-integrations | 905 | 4.75 | 60.39 | 25.71 |
Setup /wp-admin/admin.php?page=talentlms-setup | 962 | 4.73 | 60.66 | 25.80 |
Dashboard /wp-admin/admin.php?page=talentlms | 1,161 | 5.65 | 63.05 | 34.51 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.01MB] 25% from 4 tests
🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
Please fix the following items
- Uninstall procedure had uncaught errors
- > Notice in wp-content/plugins/talentlms/src/Pages/Errors.php+73
Trying to get property 'id' of non-object
- The plugin did not uninstall successfully, leaving 4 tables in the database
- wp_talentlms_products
- wp_talentlms_courses
- wp_talentlms_categories
- wp_talentlms_products_categories
- Zombie WordPress options were found after uninstall: 14 options
- tlms_courses_page_id
- tlms-apikey
- tlms_courses_page_title
- tlms_courses_page_name
- widget_tlms_widget
- theysaidso_admin_options
- tlms-woocommerce-active
- tlms-enroll-user-to-courses
- widget_theysaidso_widget
- tlms-domain
- ...
Smoke tests 25% 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)
These server-side errors were triggered
- 4 occurences, only the last one shown
- > GET request to /wp-admin/admin.php?page=talentlms
- > Notice in wp-content/plugins/talentlms/src/Pages/Errors.php+73
Trying to get property 'id' of non-object
- 4 occurences, only the last one shown
- > GET request to /wp-admin/admin.php?page=talentlms
- > User notice in wp-includes/functions.php+5905
Function wp_register_style was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the tlms-widget handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
- 4 occurences, only the last one shown
- > GET request to /wp-admin/admin.php?page=talentlms
- > User notice in wp-includes/functions.php+5905
Function wp_enqueue_style was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the tlms-widget handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
- > GET request to /wp-admin/admin.php?page=talentlms-css
- > Notice in wp-content/plugins/talentlms/src/Pages/Admin.php+174
Undefined index: action
- > GET request to /wp-admin/admin.php?page=talentlms-css
- > Notice in wp-content/plugins/talentlms/templates/css.php+4
Undefined variable: action_status
- > GET request to /wp-admin/admin.php?page=talentlms-css
- > Notice in wp-content/plugins/talentlms/templates/css.php+5
Undefined variable: action_message
- 2 occurences, only the last one shown
- > GET request to /wp-admin/admin.php?page=talentlms-setup
- > Notice in wp-content/plugins/talentlms/templates/setup.php+32
Undefined variable: enroll_user_validation
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
The following issues need your attention
- 3× PHP files perform the action of outputting non-empty strings when accessed directly:
- > /wp-content/plugins/talentlms/vendor/nikic/php-parser/grammar/rebuildParsers.php
- > /wp-content/plugins/talentlms/vendor/phpcompatibility/php-compatibility/phpunit-bootstrap.php
- > /wp-content/plugins/talentlms/templates/widget/tlmswidget.php
- 1588× PHP files trigger server errors when accessed directly (only 10 are shown):
- > PHP Fatal error
Uncaught Error: Interface 'PHP_CodeSniffer\\Sniffs\\Sniff' not found in wp-content/plugins/talentlms/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Sniffs/PHP/LowerCaseConstantSniff.php:16
- > PHP Fatal error
Uncaught Error: Class 'PHPUnit\\Framework\\Exception' not found in wp-content/plugins/talentlms/vendor/phpunit/phpunit/src/Framework/MockObject/Exception/DuplicateMethodException.php:20
- > PHP Fatal error
Uncaught Error: Class 'PHP_CodeSniffer\\Tests\\Core\\AbstractMethodUnitTest' not found in wp-content/plugins/talentlms/vendor/squizlabs/php_codesniffer/tests/Core/Tokenizer/FinallyTest.php:14
- > PHP Fatal error
Uncaught Error: Class 'PHP_CodeSniffer\\Sniffs\\AbstractScopeSniff' not found in wp-content/plugins/talentlms/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/Scope/StaticThisUsageSniff.php:16
- > PHP Fatal error
Uncaught Error: Class 'Composer\\Installers\\BaseInstaller' not found in wp-content/plugins/talentlms/vendor/composer/installers/src/Composer/Installers/CroogoInstaller.php:5
- > PHP Fatal error
Uncaught Error: Interface 'PHP_CodeSniffer\\Reports\\Report' not found in wp-content/plugins/talentlms/vendor/squizlabs/php_codesniffer/src/Reports/Notifysend.php:23
- > PHP Fatal error
Uncaught Error: Class 'PHP_CodeSniffer\\Tests\\Standards\\AbstractSniffUnitTest' not found in wp-content/plugins/talentlms/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/Strings/UnnecessaryStringConcatUnitTest.php:14
- > PHP Fatal error
Uncaught Error: Class 'PHPCompatibility\\Sniff' not found in wp-content/plugins/talentlms/vendor/phpcompatibility/php-compatibility/PHPCompatibility/Sniffs/Classes/NewLateStaticBindingSniff.php:32
- > PHP Fatal error
Uncaught Error: Class 'PHP_CodeSniffer\\Tests\\Standards\\AbstractSniffUnitTest' not found in wp-content/plugins/talentlms/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/NamingConventions/InterfaceNameSuffixUnitTest.php:13
- > PHP Fatal error
Uncaught Error: Class 'PHP_CodeSniffer\\Tests\\Standards\\AbstractSniffUnitTest' not found in wp-content/plugins/talentlms/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/CSS/ClassDefinitionOpeningBraceSpaceUnitTest.php:14
- > PHP Fatal error
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 Passed 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
6 plugin tags: learning management system, lms, elearning, hcm, talentlms...
talentlms/talentlms.php Passed 13 tests
The primary PHP file in "TalentLMS WordPress plugin" version 7.0 is used by WordPress to initiate all plugin functionality
108 characters long description:
This plugin integrates TalentLMS with WordPress. Promote your TalentLMS content through your WordPress site.
Code Analysis 3% from 3 tests
File types 0% from 1 test
🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
These items require your attention
- You should never include executable (binary) or otherwise dangerous files in your plugin
- .bat - Batch File in Windows
- ☣ wp-content/plugins/talentlms/vendor/squizlabs/php_codesniffer/bin/phpcbf.bat
- ☣ wp-content/plugins/talentlms/vendor/squizlabs/php_codesniffer/bin/phpcs.bat
- .bat - Batch File in Windows
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 2,090 | 38,176 | 244,151 | 231,920 |
Pascal | 130 | 3,217 | 7,090 | 6,548 |
Markdown | 71 | 2,784 | 0 | 6,365 |
XML | 186 | 416 | 772 | 6,107 |
JSON | 44 | 7 | 0 | 5,091 |
JavaScript | 67 | 771 | 894 | 2,203 |
yacc | 3 | 336 | 12 | 2,048 |
XSD | 4 | 6 | 0 | 1,094 |
CSS | 40 | 239 | 104 | 1,068 |
YAML | 8 | 61 | 3 | 239 |
Bourne Shell | 7 | 41 | 65 | 147 |
reStructuredText | 2 | 23 | 18 | 31 |
DOS Batch | 2 | 4 | 10 | 10 |
SVG | 2 | 0 | 0 | 2 |
PHP code 50% from 2 tests
A short review of cyclomatic complexity and code structure
Please fix the following
- Method cyclomatic complexity should be reduced to less than 100 (currently 478)
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.40 |
Average class complexity | 6.72 |
▷ Minimum class complexity | 1.00 |
▷ Maximum class complexity | 721.00 |
Average method complexity | 1.93 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 478.00 |
Code structure | ||
---|---|---|
Namespaces | 371 | |
Interfaces | 115 | |
Traits | 15 | |
Classes | 3,197 | |
▷ Abstract classes | 148 | 4.63% |
▷ Concrete classes | 3,049 | 95.37% |
▷ Final classes | 504 | 16.53% |
Methods | 20,464 | |
▷ Static methods | 2,789 | 13.63% |
▷ Public methods | 15,924 | 77.81% |
▷ Protected methods | 3,309 | 16.17% |
▷ Private methods | 1,231 | 6.02% |
Functions | 6,011 | |
▷ Named functions | 4,707 | 78.31% |
▷ Anonymous functions | 1,304 | 21.69% |
Constants | 1,216 | |
▷ Global constants | 169 | 13.90% |
▷ Class constants | 1,047 | 86.10% |
▷ Public constants | 993 | 94.84% |
Plugin size Passed 2 tests
Image compression Passed 2 tests
PNG files should be compressed to save space and minimize bandwidth usage
5 compressed PNG files occupy 0.00MB
Potential savings
Compression of 5 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
assets/images/sort_asc_disabled.png | 0.14KB | 0.25KB | 0.00% |
assets/images/sort_both.png | 0.20KB | 0.29KB | 0.00% |
assets/images/sort_asc.png | 0.16KB | 0.25KB | 0.00% |
assets/images/sort_desc_disabled.png | 0.14KB | 0.25KB | 0.00% |
assets/images/sort_desc.png | 0.15KB | 0.25KB | 0.00% |