58% sikshya

Code Review | Learning Management System, eLearning, Course Builder, WordPress LMS Plugin - Sikshya LMS

WordPress plugin Learning Management System, eLearning, Course Builder, WordPress LMS Plugin - Sikshya LMS scored58%from 54 tests.

About plugin

  • Plugin page: sikshya
  • Plugin version: 0.0.20
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-6.2
  • WordPress version: 6.3.1
  • First release: Nov 26, 2019
  • Latest release: Jun 10, 2023
  • Number of updates: 22
  • Update frequency: every 59.9 days
  • Top authors: mantrabrain (100%)

Code review

54 tests

User reviews

1 review

Install metrics

90+ active /9,990 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
This plugin's installer ran successfully

Server metrics [RAM: ▲0.42MB] [CPU: ▲0.88ms] 75% from 4 tests

Analyzing server-side resources used by Learning Management System, eLearning, Course Builder, WordPress LMS Plugin - Sikshya LMS
Please fix the following
  • CPU: Total CPU usage should be kept under 500.00ms (currently 1,634.31ms on /wp-admin/edit.php?post_type=sik_courses&page=sikshya-status)
PageMemory (MB)CPU Time (ms)
Home /3.87 ▲0.4240.37 ▼2.34
Dashboard /wp-admin3.72 ▲0.4247.02 ▼3.52
Posts /wp-admin/edit.php3.80 ▲0.4553.19 ▲3.27
Add New Post /wp-admin/post-new.php6.73 ▲0.84106.07 ▲9.45
Media Library /wp-admin/upload.php3.64 ▲0.4240.33 ▲6.09
Import/Export /wp-admin/edit.php?post_type=sik_courses&page=sikshya_course_import_export3.5834.00
Students /wp-admin/edit.php?post_type=sik_courses&page=students3.6338.26
Status /wp-admin/edit.php?post_type=sik_courses&page=sikshya-status4.091,634.31
Questions /wp-admin/edit.php?post_type=sik_questions3.7440.88
Settings /wp-admin/edit.php?post_type=sik_courses&page=sik-settings3.6835.12
Sections /wp-admin/edit.php?post_type=sik_sections3.7438.16
Add New /wp-admin/post-new.php?post_type=sik_courses3.8557.82
Courses /wp-admin/edit.php?post_type=sik_courses3.7443.18
Tag /wp-admin/edit-tags.php?taxonomy=sik_course_tag&post_type=sik_courses3.6436.14
Quizzes /wp-admin/edit.php?post_type=sik_quizzes3.7437.15

Server storage [IO: ▲5.80MB] [DB: ▲0.02MB] Passed 3 tests

Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 353 new files
Database: 5 new tables, 28 new options
New tables
wp_sikshya_order_itemmeta
wp_sikshya_order_items
wp_sikshya_user_items
wp_sikshya_user_itemmeta
wp_sikshya_logs
New WordPress options
widget_theysaidso_widget
sikshya_payment_gateway_paypal_help_url
can_compress_scripts
sikshya_queue_flush_rewrite_rules
sikshya_price_number_decimals
sikshya_currency
sikshya_registration_page
sikshya_login_page
sikshya_thankyou_page
sikshya_checkout_page
...

Browser metrics Passed 4 tests

Checking browser requirements for Learning Management System, eLearning, Course Builder, WordPress LMS Plugin - Sikshya LMS
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,030 ▲27314.70 ▲0.347.61 ▲5.3338.77 ▼9.27
Dashboard /wp-admin2,329 ▲1385.55 ▲0.68118.91 ▲12.7138.92 ▼3.57
Posts /wp-admin/edit.php2,225 ▲1322.70 ▲0.7155.89 ▲14.2735.35 ▼0.89
Add New Post /wp-admin/post-new.php1,638 ▲10418.84 ▼4.18608.44 ▼31.9734.95 ▼18.37
Media Library /wp-admin/upload.php1,516 ▲1254.80 ▲0.59103.62 ▲6.7941.73 ▼0.08
Import/Export /wp-admin/edit.php?post_type=sik_courses&page=sikshya_course_import_export9942.5643.4236.07
Students /wp-admin/edit.php?post_type=sik_courses&page=students1,1022.5631.5925.91
Status /wp-admin/edit.php?post_type=sik_courses&page=sikshya-status2,4583.0142.1534.24
Questions /wp-admin/edit.php?post_type=sik_questions1,1842.5242.2525.80
Settings /wp-admin/edit.php?post_type=sik_courses&page=sik-settings1,9562.5735.0974.09
Sections /wp-admin/edit.php?post_type=sik_sections1,2002.5236.9927.74
Add New /wp-admin/post-new.php?post_type=sik_courses2,8717.70196.8966.77
Courses /wp-admin/edit.php?post_type=sik_courses1,2242.5238.1128.93
Tag /wp-admin/edit-tags.php?taxonomy=sik_course_tag&post_type=sik_courses1,4042.3233.2627.88
Quizzes /wp-admin/edit.php?post_type=sik_quizzes1,1842.4940.0724.11

Uninstaller [IO: ▲0.00MB] [DB: ▲0.02MB] 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
  • This plugin does not fully uninstall, leaving 5 tables in the database
    • wp_sikshya_order_itemmeta
    • wp_sikshya_user_itemmeta
    • wp_sikshya_logs
    • wp_sikshya_user_items
    • wp_sikshya_order_items
  • This plugin does not fully uninstall, leaving 28 options in the database
    • sikshya_payment_gateway_paypal_description
    • can_compress_scripts
    • widget_sikshya_courses_widget
    • widget_recent-posts
    • sikshya_payment_gateway_enable_logging
    • sikshya_login_page
    • sikshya_payment_gateway_paypal_help_text
    • sikshya_price_number_decimals
    • db_upgraded
    • sikshya_thankyou_page
    • ...

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 0% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please fix the following
  • 2× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/sikshya/templates/course-none.php
    • > /wp-content/plugins/sikshya/includes/admin/templates/metabox/course/options.php
  • 197× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/sikshya/includes/meta-boxes/views/tmpl/answer/add-answer.php:4
    • > PHP Warning
      include_once(SIKSHYA_PATH/includes/payment-gateways/function-sikshya-payments.php): failed to open stream: No such file or directory in wp-content/plugins/sikshya/includes/payment-gateways/class-sikshya-gateways-core.php on line 34
    • > PHP Warning
      include_once(): Failed opening 'SIKSHYA_PATH/includes/admin/class-sikshya-admin-form-handler.php' for inclusion (include_path='.:/usr/share/php') in wp-content/plugins/sikshya/includes/admin/class-sikshya-admin.php on line 18
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/sikshya/templates/profile/parts/enrolled-courses.php:1
    • > PHP Notice
      Undefined variable: id in wp-content/plugins/sikshya/includes/meta-boxes/views/tmpl/editor.php on line 3
    • > PHP Warning
      Use of undefined constant SIKSHYA_PATH - assumed 'SIKSHYA_PATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/sikshya/includes/admin/class-sikshya-admin.php on line 21
    • > PHP Warning
      include_once(SIKSHYA_PATH/includes/hooks/class-sikshya-template-hooks.php): failed to open stream: No such file or directory in wp-content/plugins/sikshya/includes/class-sikshya-hooks.php on line 8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function sikshya() in wp-content/plugins/sikshya/templates/parts/course/single-content.php:3
    • > PHP Warning
      include_once(SIKSHYA_PATH/includes/payment-gateways/paypal/class-sikshya-payment-gateway-paypal.php): failed to open stream: No such file or directory in wp-content/plugins/sikshya/includes/payment-gateways/class-sikshya-gateways-core.php on line 37
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/sikshya/includes/class-sikshya-assets.php:7

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser errors were detected

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
6 plugin tags: course, elearning, learning management system, quizzes, education...

sikshya/sikshya.php 92% from 13 tests

"Learning Management System, eLearning, Course Builder, WordPress LMS Plugin - Sikshya LMS" version 0.0.20's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
Please make the necessary changes and fix the following:
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 161 characters long)

Code Analysis 5% from 3 tests

File types 0% from 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Please make sure to remedy the following
  • For security reasons, never distribute binary or executable files with your plugin
    • .crt - Security Certificate in Firefox, IE, Chrome, Safari
      • wp-content/plugins/sikshya/includes/payment-gateways/paypal/php-paypal-ipn/cert/api_cert_chain.crt
52,372 lines of code in 301 files:
LanguageFilesBlank linesComment linesLines of code
PHP2115,0772,98618,377
CSS422,38820110,713
SVG40138,895
JavaScript282,1881,3637,706
Sass1462103,711
JSON1002,901
HTML119069

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.40
Average class complexity16.72
▷ Minimum class complexity1.00
▷ Maximum class complexity143.00
Average method complexity3.33
▷ Minimum method complexity1.00
▷ Maximum method complexity76.00
Code structure
Namespaces0
Interfaces2
Traits0
Classes99
▷ Abstract classes66.06%
▷ Concrete classes9393.94%
▷ Final classes22.15%
Methods695
▷ Static methods8111.65%
▷ Public methods58183.60%
▷ Protected methods7911.37%
▷ Private methods355.04%
Functions105
▷ Named functions105100.00%
▷ Anonymous functions00.00%
Constants33
▷ Global constants2060.61%
▷ Class constants1339.39%
▷ Public constants13100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
2 compressed PNG files occupy 0.01MB
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/paypal.png5.39KB5.33KB▼ 1.18%
assets/images/yes.png0.84KB1.00KB0.00%