62% sakolawp-lite

Code Review | School Management System - SakolaWP

WordPress plugin School Management System - SakolaWP scored62%from 54 tests.

About plugin

  • Plugin page: sakolawp-lite
  • Plugin version: 1.0.8
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.1
  • WordPress version: 6.3.1
  • First release: Jul 1, 2020
  • Latest release: Dec 16, 2022
  • Number of updates: 19
  • Update frequency: every 47.3 days
  • Top authors: themesawesome (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

200+ active /11,822 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Install script ran successfully

Server metrics [RAM: ▲0.71MB] [CPU: ▼1.34ms] Passed 4 tests

Server-side resources used by School Management System - SakolaWP
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /4.18 ▲0.7245.74 ▲2.83
Dashboard /wp-admin4.05 ▲0.7450.92 ▼1.13
Posts /wp-admin/edit.php4.10 ▲0.7449.73 ▲1.52
Add New Post /wp-admin/post-new.php6.58 ▲0.7090.27 ▼8.56
Media Library /wp-admin/upload.php3.90 ▲0.6842.03 ▲5.82
Add New /wp-admin/post-new.php?post_type=sakolawp-news4.0955.56
All Event /wp-admin/edit.php?post_type=sakolawp-event4.0138.87
Assign Student /wp-admin/admin.php?page=sakolawp-assign-student3.8841.49
Students Area /wp-admin/admin.php?page=sakolawp-student-area3.9139.08
Manage Report Attendance /wp-admin/admin.php?page=sakolawp-manage-report-attendance3.9735.14
Manage Attendance /wp-admin/admin.php?page=sakolawp-manage-attendance3.9736.22
Tags /wp-admin/edit-tags.php?taxonomy=news-tags&post_type=sakolawp-news3.9034.80
Manage Routines /wp-admin/admin.php?page=sakolawp-manage-routine3.9834.23
Manage Classes /wp-admin/admin.php?page=sakolawp-manage-class3.8834.75
Manage Subjects /wp-admin/admin.php?page=sakolawp-manage-subject3.8936.97

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

Input-output and database impact of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 166 new files
Database: 16 new tables, 7 new options
New tables
wp_sakolawp_exam
wp_sakolawp_attendance_log
wp_sakolawp_mark
wp_sakolawp_class_routine
wp_sakolawp_questions_bank
wp_sakolawp_homework
wp_sakolawp_class
wp_sakolawp_settings
wp_sakolawp_exams
wp_sakolawp_questions
...
New WordPress options
db_upgraded
sakolawp_db_version
can_compress_scripts
widget_recent-posts
theysaidso_admin_options
widget_recent-comments
widget_theysaidso_widget

Browser metrics Passed 4 tests

School Management System - SakolaWP: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,226 ▲46914.64 ▲0.2719.52 ▲17.3734.12 ▼16.08
Dashboard /wp-admin2,457 ▲2695.50 ▼0.40115.38 ▲0.6843.37 ▲0.09
Posts /wp-admin/edit.php2,247 ▲1582.57 ▲0.5637.58 ▲4.4032.74 ▼3.31
Add New Post /wp-admin/post-new.php1,643 ▲12423.53 ▲0.53673.43 ▲4.1738.43 ▼17.05
Media Library /wp-admin/upload.php1,625 ▲2404.67 ▲0.4597.40 ▼14.0441.08 ▼3.89
Add New /wp-admin/post-new.php?post_type=sakolawp-news2,4998.35188.0566.03
All Event /wp-admin/edit.php?post_type=sakolawp-event1,2112.1734.0128.44
Assign Student /wp-admin/admin.php?page=sakolawp-assign-student1,0342.1127.5940.93
Students Area /wp-admin/admin.php?page=sakolawp-student-area1,0042.1029.8929.62
Manage Report Attendance /wp-admin/admin.php?page=sakolawp-manage-report-attendance1,1062.1225.9428.78
Manage Attendance /wp-admin/admin.php?page=sakolawp-manage-attendance1,0652.5932.4827.81
Tags /wp-admin/edit-tags.php?taxonomy=news-tags&post_type=sakolawp-news1,4172.3830.1328.14
Manage Routines /wp-admin/admin.php?page=sakolawp-manage-routine1,5612.1126.2626.75
Manage Classes /wp-admin/admin.php?page=sakolawp-manage-class1,0072.1125.2527.67
Manage Subjects /wp-admin/admin.php?page=sakolawp-manage-subject1,0992.0927.6725.11

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • Zombie tables detected upon uninstall: 16 tables
    • wp_sakolawp_questions_bank
    • wp_sakolawp_student_answer
    • wp_sakolawp_attendance_log
    • wp_sakolawp_mark
    • wp_sakolawp_homework
    • wp_sakolawp_section
    • wp_sakolawp_settings
    • wp_sakolawp_exam
    • wp_sakolawp_attendance
    • wp_sakolawp_enroll
    • ...
  • Zombie WordPress options were found after uninstall: 7 options
    • db_upgraded
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-comments
    • can_compress_scripts
    • sakolawp_db_version
    • widget_recent-posts

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Smoke test failed, please fix the following
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=sakolawp-manage-report-attendance
    • > Notice in wp-content/plugins/sakolawp-lite/admin/partials/sakolawp-manage-report-attendance.php+112
    Undefined offset: 1
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=sakolawp-manage-routine
    • > Notice in wp-content/plugins/sakolawp-lite/admin/partials/sakolawp-manage-routine.php+87
    Trying to access array offset on value of type null

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
The following issues need your attention
  • 2× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/sakolawp-lite/public/partials/sakolawp-public-display.php
    • > /wp-content/plugins/sakolawp-lite/templates/student/my_marks.php
  • 40× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/sakolawp-lite/settings.php:20
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_page() in wp-content/plugins/sakolawp-lite/rename/parent-rename.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_role() in wp-content/plugins/sakolawp-lite/sakolawp_add_roles.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function current_user_can() in wp-content/plugins/sakolawp-lite/redirects/admin-redirects.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/sakolawp-lite/template/myaccount-shortcode.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_url() in wp-content/plugins/sakolawp-lite/admin/partials/sakolawp-manage-section.php:23
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_header() in wp-content/plugins/sakolawp-lite/templates/administrator/view_user.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/sakolawp-lite/admin/partials/sakolawp-exam.php:17
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_header() in wp-content/plugins/sakolawp-lite/templates/teacher/edit_profile.php:55
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_theme_mod() in wp-content/plugins/sakolawp-lite/template/login-shortcode.php:3

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
These attributes need to be fixed:
  • Screenshots: These screenshots need descriptions #10, #11, #12, #13, #14, #15, #16, #17, #18, #19, #2, #20, #3, #4, #5, #6, #7, #8, #9 in sakolawp-lite/assets to your readme.txt
You can take inspiration from this readme.txt

sakolawp-lite/sakolawp.php 85% from 13 tests

"School Management System - SakolaWP" version 1.0.8's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
The following require your attention:
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("sakolawp-lite.php" instead of "sakolawp.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Everything looks great! No dangerous files found in this plugin26,308 lines of code in 131 files:
LanguageFilesBlank linesComment linesLines of code
PHP1011,87586116,216
CSS115791924,377
SVG4303,178
JavaScript155482812,537

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.30
Average class complexity12.20
▷ Minimum class complexity1.00
▷ Maximum class complexity106.00
Average method complexity2.58
▷ Minimum method complexity1.00
▷ Maximum method complexity40.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes10
▷ Abstract classes00.00%
▷ Concrete classes10100.00%
▷ Final classes00.00%
Methods71
▷ Static methods22.82%
▷ Public methods5780.28%
▷ Protected methods912.68%
▷ Private methods57.04%
Functions72
▷ Named functions72100.00%
▷ Anonymous functions00.00%
Constants5
▷ Global constants5100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
4 PNG files occupy 0.18MB with 0.06MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
admin/img/swp-icon.png0.31KB0.38KB0.00%
public/img/skwp-hello-account.png170.50KB70.01KB▼ 58.94%
admin/css/Logo-dash.png8.13KB4.76KB▼ 41.46%
admin/img/swp-logo.png1.51KB1.00KB▼ 34.00%