10% quick-learn

Code Review | Quick Learn

WordPress plugin Quick Learn scored10%from 54 tests.

About plugin

  • Plugin page: quick-learn
  • Plugin version: 1.0.1
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.8-6.1
  • WordPress version: 6.3.1
  • First release: Nov 7, 2022
  • Latest release: Dec 2, 2022
  • Number of updates: 23
  • Update frequency: every 11.7 days
  • Top authors: tbinfotech (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /660 total downloads

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 did not install without errors
    • > 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: ▲1.64MB] [CPU: ▲12.81ms] Passed 4 tests

This is a short check of server-side resources used by Quick Learn
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /4.98 ▲1.5146.23 ▲0.46
Dashboard /wp-admin4.98 ▲1.6771.65 ▲17.73
Posts /wp-admin/edit.php5.09 ▲1.7373.84 ▲23.89
Add New Post /wp-admin/post-new.php7.70 ▲1.81112.51 ▲9.15
Media Library /wp-admin/upload.php4.88 ▲1.6464.74 ▲28.87
Students /wp-admin/admin.php?page=students4.8757.17
Tags /wp-admin/edit-tags.php?taxonomy=course_tag4.9061.40
Quick Learn /wp-admin/admin.php?page=lms-settings14.8554.36
Settings /wp-admin/admin.php?page=allshortcode4.9666.78
Import Demo /wp-admin/admin.php?page=import_demo4.8763.69
Pay Commission /wp-admin/admin.php?page=instructor-payment4.8757.66
Instructors /wp-admin/admin.php?page=instructors4.8757.38
Categories /wp-admin/edit-tags.php?taxonomy=course-categories4.9061.88
Reviews /wp-admin/admin.php?page=reviews4.8553.96
Sales Report /wp-admin/admin.php?page=sales_report4.8758.95

Server storage [IO: ▲7.61MB] [DB: ▲0.03MB] Passed 3 tests

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 307 new files
Database: 14 new tables, 6 new options
New tables
wp_gsplms_rating
wp_gsp_user_itemmeta
wp_gsplms_setting
wp_gsp_instructor_payment
wp_gsp_lms_setting_meta
wp_gsplms_section_items
wp_gsplms_quiz_questions
wp_gsp_lms_wishlist
wp_completed_lesson
wp_gsp_user_retakemeta
...
New WordPress options
can_compress_scripts
widget_recent-comments
db_upgraded
theysaidso_admin_options
widget_recent-posts
widget_theysaidso_widget

Browser metrics Passed 4 tests

Checking browser requirements for Quick Learn
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,172 ▲41115.08 ▲0.887.89 ▲6.0638.83 ▼6.01
Dashboard /wp-admin2,449 ▲2696.23 ▲0.56119.83 ▲28.7850.98 ▲5.67
Posts /wp-admin/edit.php2,395 ▲2953.47 ▲1.4954.58 ▲15.0545.02 ▲9.20
Add New Post /wp-admin/post-new.php1,780 ▲25421.56 ▼1.97717.16 ▼1.9444.23 ▼13.09
Media Library /wp-admin/upload.php1,513 ▲1134.20 ▼0.0088.26 ▼17.7151.70 ▼0.22
Students /wp-admin/admin.php?page=students1,1213.2041.1634.96
Tags /wp-admin/edit-tags.php?taxonomy=course_tag1,5583.1750.2343.75
Quick Learn /wp-admin/admin.php?page=lms-settings11,0533.2840.7128.19
Settings /wp-admin/admin.php?page=allshortcode4,64413.49300.7160.00
Import Demo /wp-admin/admin.php?page=import_demo1,0833.1640.0533.97
Pay Commission /wp-admin/admin.php?page=instructor-payment1,0753.0641.9736.43
Instructors /wp-admin/admin.php?page=instructors1,0763.0741.8931.80
Categories /wp-admin/edit-tags.php?taxonomy=course-categories1,5513.0750.1940.06
Reviews /wp-admin/admin.php?page=reviews1,1233.1341.6132.85
Sales Report /wp-admin/admin.php?page=sales_report1,1643.1642.3030.73

Uninstaller [IO: ▲0.00MB] [DB: ▲0.03MB] 50% from 4 tests

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
  • This plugin does not fully uninstall, leaving 14 tables in the database
    • wp_gsplms_rating
    • wp_user_payments
    • wp_gsplms_setting
    • wp_gsp_instructor_payment
    • wp_gsplms_section_items
    • wp_gsp_user_items
    • wp_gsp_lms_wishlist
    • wp_gsp_user_itemmeta
    • wp_gsplms_quiz_questions
    • wp_gsplms_question_answers
    • ...
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-comments
    • widget_theysaidso_widget
    • widget_recent-posts
    • db_upgraded
    • can_compress_scripts
    • theysaidso_admin_options

Smoke tests 0% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Almost there, just fix the following server-side errors
    • > GET request to /wp-admin/admin.php?page=lms-settings1
    • > Warning in wp-includes/class-wp-hook.php+310
    call_user_func_array() expects parameter 1 to be a valid callback, function '5' not found or invalid function name
    • > GET request to /wp-admin/admin.php?page=reviews
    • > 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.)

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 take a closer look at the following
  • 3× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/quick-learn/html2pdf/vendor/tecnickcom/tcpdf/tools/tcpdf_addfont.php
    • > /wp-content/plugins/quick-learn/inc/admin/template-part/searchquestion.php
    • > /wp-content/plugins/quick-learn/inc/admin/template-part/searchitem.php
  • 95× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'Spipu\\Html2Pdf\\Tests\\AbstractTest' not found in wp-content/plugins/quick-learn/html2pdf/vendor/spipu/html2pdf/src/Tests/Tag/Svg/RectErrorTest.php:20
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_theme_support() in wp-content/plugins/quick-learn/inc/gsp-functions.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_current_user_id() in wp-content/plugins/quick-learn/templates/single-lms-courses.php:4
    • > PHP Fatal error
      Uncaught Error: Class 'Spipu\\Html2Pdf\\Tag\\Html\\B' not found in wp-content/plugins/quick-learn/html2pdf/vendor/spipu/html2pdf/src/Tag/Html/Strong.php:17
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit_Framework_TestCase' not found in wp-content/plugins/quick-learn/html2pdf/vendor/spipu/html2pdf/src/Tests/Parsing/HtmlLexerTest.php:20
    • > PHP Fatal error
      Uncaught Error: Interface 'Spipu\\Html2Pdf\\Tag\\TagInterface' not found in wp-content/plugins/quick-learn/html2pdf/vendor/spipu/html2pdf/src/Tag/AbstractTag.php:24
    • > PHP Fatal error
      Uncaught Error: Class 'Spipu\\Html2Pdf\\Tag\\Html\\U' not found in wp-content/plugins/quick-learn/html2pdf/vendor/spipu/html2pdf/src/Tag/Html/Ins.php:17
    • > PHP Fatal error
      Uncaught Error: Class 'Spipu\\Html2Pdf\\Exception\\Html2PdfException' not found in wp-content/plugins/quick-learn/html2pdf/vendor/spipu/html2pdf/src/Exception/LongSentenceException.php:18
    • > PHP Fatal error
      Uncaught Error: Class 'Spipu\\Html2Pdf\\Tag\\Html\\I' not found in wp-content/plugins/quick-learn/html2pdf/vendor/spipu/html2pdf/src/Tag/Html/Samp.php:17
    • > PHP Fatal error
      Uncaught Error: Class 'Spipu\\Html2Pdf\\Tests\\AbstractTest' not found in wp-content/plugins/quick-learn/html2pdf/vendor/spipu/html2pdf/src/Tests/Tag/Svg/PolygonErrorTest.php:20

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Please take a look at the following user-side issues
    • > GET request to /wp-admin/admin.php?page=students
    • > Console-api (warning) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,moxiejs,plupload&ver=6.3.1 1:28609 "jQuery.Deferred exception: Cannot read properties of null (reading 'addEventListener')" "TypeError: Cannot read properties of null (reading 'addEventListener')\n at HTMLDocument.\u003Canonymous> (/wp-content/plugins/quick-learn//assets/js/tbit-quick-learn-common.js?id=439201151&ver=6.3.1:646:10)\n at e (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,moxiejs,plupload&ver=6.3.1:2:26990)\n at t (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,moxiejs,plupload&ver=6.3.1:2:27292)" undefined
  • 9 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=sales_report
    • > Javascript (severe) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,moxiejs,plupload&ver=6.3.1 1:28721 Uncaught TypeError: Cannot read properties of null (reading 'addEventListener')
    • > GET request to /wp-admin/edit-tags.php?taxonomy=course_tag
    • > Console-api (warning) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,moxiejs,plupload&ver=6.3.1 1:28609 "jQuery.Deferred exception: Cannot read properties of null (reading 'addEventListener')" "TypeError: Cannot read properties of null (reading 'addEventListener')\n at HTMLDocument.\u003Canonymous> (/wp-content/plugins/quick-learn//assets/js/tbit-quick-learn-common.js?id=985373471&ver=6.3.1:646:10)\n at e (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,moxiejs,plupload&ver=6.3.1:2:26990)\n at t (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,moxiejs,plupload&ver=6.3.1:2:27292)" undefined
    • > GET request to /wp-admin/admin.php?page=lms-settings1
    • > Console-api (warning) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,moxiejs,plupload&ver=6.3.1 1:28609 "jQuery.Deferred exception: Cannot read properties of null (reading 'addEventListener')" "TypeError: Cannot read properties of null (reading 'addEventListener')\n at HTMLDocument.\u003Canonymous> (/wp-content/plugins/quick-learn//assets/js/tbit-quick-learn-common.js?id=1186075702&ver=6.3.1:646:10)\n at e (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,moxiejs,plupload&ver=6.3.1:2:26990)\n at t (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,moxiejs,plupload&ver=6.3.1:2:27292)" undefined
    • > GET request to /wp-admin/admin.php?page=import_demo
    • > Console-api (warning) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,moxiejs,plupload&ver=6.3.1 1:28609 "jQuery.Deferred exception: Cannot read properties of null (reading 'addEventListener')" "TypeError: Cannot read properties of null (reading 'addEventListener')\n at HTMLDocument.\u003Canonymous> (/wp-content/plugins/quick-learn//assets/js/tbit-quick-learn-common.js?id=631455099&ver=6.3.1:646:10)\n at e (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,moxiejs,plupload&ver=6.3.1:2:26990)\n at t (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,moxiejs,plupload&ver=6.3.1:2:27292)" undefined
    • > GET request to /wp-admin/admin.php?page=instructor-payment
    • > Console-api (warning) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,moxiejs,plupload&ver=6.3.1 1:28609 "jQuery.Deferred exception: Cannot read properties of null (reading 'addEventListener')" "TypeError: Cannot read properties of null (reading 'addEventListener')\n at HTMLDocument.\u003Canonymous> (/wp-content/plugins/quick-learn//assets/js/tbit-quick-learn-common.js?id=740361968&ver=6.3.1:646:10)\n at e (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,moxiejs,plupload&ver=6.3.1:2:26990)\n at t (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,moxiejs,plupload&ver=6.3.1:2:27292)" undefined
    • > GET request to /wp-admin/admin.php?page=instructors
    • > Console-api (warning) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,moxiejs,plupload&ver=6.3.1 1:28609 "jQuery.Deferred exception: Cannot read properties of null (reading 'addEventListener')" "TypeError: Cannot read properties of null (reading 'addEventListener')\n at HTMLDocument.\u003Canonymous> (/wp-content/plugins/quick-learn//assets/js/tbit-quick-learn-common.js?id=903084041&ver=6.3.1:646:10)\n at e (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,moxiejs,plupload&ver=6.3.1:2:26990)\n at t (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,moxiejs,plupload&ver=6.3.1:2:27292)" undefined
    • > GET request to /wp-admin/edit-tags.php?taxonomy=course-categories
    • > Console-api (warning) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,moxiejs,plupload&ver=6.3.1 1:28609 "jQuery.Deferred exception: Cannot read properties of null (reading 'addEventListener')" "TypeError: Cannot read properties of null (reading 'addEventListener')\n at HTMLDocument.\u003Canonymous> (/wp-content/plugins/quick-learn//assets/js/tbit-quick-learn-common.js?id=1299963943&ver=6.3.1:646:10)\n at e (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,moxiejs,plupload&ver=6.3.1:2:26990)\n at t (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,moxiejs,plupload&ver=6.3.1:2:27292)" undefined
    • > GET request to /wp-admin/admin.php?page=reviews
    • > Console-api (warning) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,moxiejs,plupload&ver=6.3.1 1:28609 "jQuery.Deferred exception: Cannot read properties of null (reading 'addEventListener')" "TypeError: Cannot read properties of null (reading 'addEventListener')\n at HTMLDocument.\u003Canonymous> (/wp-content/plugins/quick-learn//assets/js/tbit-quick-learn-common.js?id=1393478600&ver=6.3.1:646:10)\n at e (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,moxiejs,plupload&ver=6.3.1:2:26990)\n at t (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,moxiejs,plupload&ver=6.3.1:2:27292)" undefined
    • > GET request to /wp-admin/admin.php?page=sales_report
    • > Console-api (warning) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,moxiejs,plupload&ver=6.3.1 1:28609 "jQuery.Deferred exception: Cannot read properties of null (reading 'addEventListener')" "TypeError: Cannot read properties of null (reading 'addEventListener')\n at HTMLDocument.\u003Canonymous> (/wp-content/plugins/quick-learn//assets/js/tbit-quick-learn-common.js?id=665091458&ver=6.3.1:646:10)\n at e (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,moxiejs,plupload&ver=6.3.1:2:26990)\n at t (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,moxiejs,plupload&ver=6.3.1:2:27292)" undefined

Optimizations

Plugin configuration 86% from 29 tests

readme.txt 81% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
These attributes need to be fixed:
  • Screenshots: These screenshots require images: #1 (Backend Instructors List view), #2 (Backend Students List view), #3 (Course Categories view), #4 (Course Tags view), #5 (Backend List of Courses view), #6 (Couse Edit/Add New view), #7 (Backend List of Lessons view), #8 (Lesson Edit/Add New view), #9 (Backend List of Assessments view), #10 (Assessment Edit/Add New view), #11 (Backend List of Questions view), #12 (Questions Edit/Add New view), #13 (Backend List of Ratings and Reviews view), #14 (Backend Settings (1)), #15 (Backend Settings (2)), #16 (Backend Settings (3)), #17 (Backend Settings (4)), #18 (Backend Settings (5)), #19 (Backend Settings (6)), #20 (Backend Settings (7)), #21 (Sales Report), #22 (Payment History (for Instructors )), #23 (Import Demo), #24 (Frontend Listing View), #25 (Frontend Single Course View), #26 (Assessment Start View), #27 (Assessment Question View (2)), #28 (Assessment Result View), #29 (Add to Cart View), #30 (Select Payment Gateway), #31 (Payment Page for Stripe)
  • Tags: Please delete some tags, you are using 17 tag instead of maximum 10
  • Donate link: Please fix this invalid url: "#"
You can take inspiration from this readme.txt

quick-learn/tbit_quicklearn.php 92% from 13 tests

Analyzing the main PHP file in "Quick Learn" version 1.0.1
You should first fix the following items:
  • Main file name: Name the main plugin file the same as the plugin slug ("quick-learn.php" instead of "tbit_quicklearn.php")

Code Analysis 95% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Good job! No executable or dangerous file extensions detected78,000 lines of code in 220 files:
LanguageFilesBlank linesComment linesLines of code
PHP1707,01517,38267,617
CSS131,377874,347
SVG1002,671
JavaScript10350681,765
Markdown1850001,344
JSON400217
XML10026
YAML12011
HTML2262

PHP code 0% from 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
The following items need your attention
  • Class cyclomatic complexity has to be reduced to less than 1000 (currently 4,413)
  • Method cyclomatic complexity should be reduced to less than 100 (currently 502)
Cyclomatic complexity
Average complexity per logical line of code0.42
Average class complexity76.92
▷ Minimum class complexity1.00
▷ Maximum class complexity4,413.00
Average method complexity7.59
▷ Minimum method complexity1.00
▷ Maximum method complexity502.00
Code structure
Namespaces17
Interfaces3
Traits0
Classes102
▷ Abstract classes54.90%
▷ Concrete classes9795.10%
▷ Final classes00.00%
Methods1,224
▷ Static methods1169.48%
▷ Public methods76862.75%
▷ Protected methods45437.09%
▷ Private methods20.16%
Functions221
▷ Named functions21597.29%
▷ Anonymous functions62.71%
Constants155
▷ Global constants14694.19%
▷ Class constants95.81%
▷ Public constants9100.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
5 PNG files occupy 0.27MB with 0.17MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
import/image/course_featured.png220.19KB75.04KB▼ 65.92%
image/tick-mark.png36.12KB7.79KB▼ 78.43%
image/default.png0.83KB0.76KB▼ 8.24%
(invalid) image/default_avater.png1.49KB0.00KB▼ 100.00%
html2pdf/vendor/spipu/html2pdf/src/Tests/Image/res/logo.png20.53KB7.63KB▼ 62.85%