52% school-management-system

Code Review | The School Management - Education & Learning Management

WordPress plugin The School Management - Education & Learning Management scored52%from 54 tests.

About plugin

  • Plugin page: school-management...
  • Plugin version: 4.4
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-6.4
  • WordPress version: 6.3.1
  • First release: Oct 15, 2019
  • Latest release: Oct 27, 2023
  • Number of updates: 48
  • Update frequency: every 30.7 days
  • Top authors: weblizar (100%)

Code review

54 tests

User reviews

11 reviews

Install metrics

1,000+ active /76,153 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
Install script ran successfully

Server metrics [RAM: ▲2.04MB] [CPU: ▲11.39ms] Passed 4 tests

Analyzing server-side resources used by The School Management - Education & Learning Management
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /4.36 ▲0.8945.82 ▲7.05
Dashboard /wp-admin5.73 ▲2.4372.51 ▲27.51
Posts /wp-admin/edit.php5.79 ▲2.4357.84 ▲4.64
Add New Post /wp-admin/post-new.php8.32 ▲2.4396.06 ▲12.23
Media Library /wp-admin/upload.php5.66 ▲2.4254.46 ▲21.62
Sessions /wp-admin/admin.php?page=sm-sessions5.5844.62
Classes /wp-admin/admin.php?page=sm-classes5.5842.04
Inquiries /wp-admin/admin.php?page=sm-staff-inquiries5.5943.79
Dashboard /wp-admin/admin.php?page=sm-staff-dashboard5.7457.93
Roles /wp-admin/admin.php?page=sm-staff-roles5.5946.63
Dashboard /wp-admin/admin.php?page=sm-staff-academic5.6048.82
Settings /wp-admin/admin.php?page=sm-settings5.6445.88
ID Cards /wp-admin/admin.php?page=sm-staff-id-cards5.5945.00
Dashboard /wp-admin/admin.php?page=sm-staff-student5.6044.84
Students /wp-admin/admin.php?page=sm-staff-students5.6146.25

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

Analyzing filesystem and database footprints of this plugin
This plugin installed successfully
Filesystem: 452 new files
Database: 17 new tables, 11 new options
New tables
wp_wlsm_notices
wp_wlsm_staff
wp_wlsm_admin_subject
wp_wlsm_sections
wp_wlsm_schools
wp_wlsm_promotions
wp_wlsm_invoices
wp_wlsm_classes
wp_wlsm_inquiries
wp_wlsm_class_school
...
New WordPress options
wlsm_currency
widget_recent-comments
db_upgraded
theysaidso_admin_options
widget_wlsm_noticeboard_widget
wlsm_current_session
widget_wlsm_login_widget
wlsm_date_format
widget_theysaidso_widget
can_compress_scripts
...

Browser metrics Passed 4 tests

A check of browser resources used by The School Management - Education & Learning Management
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,101 ▲34013.58 ▼0.9811.78 ▲10.1642.46 ▲1.44
Dashboard /wp-admin2,369 ▲1925.68 ▲0.0197.28 ▲4.9043.65 ▲2.12
Posts /wp-admin/edit.php2,274 ▲1741.99 ▲0.0034.52 ▼0.3834.99 ▼4.76
Add New Post /wp-admin/post-new.php1,667 ▲14123.29 ▲0.12668.96 ▼18.9757.51 ▼3.43
Media Library /wp-admin/upload.php1,574 ▲1774.12 ▼0.0995.34 ▼4.1245.71 ▲0.70
Sessions /wp-admin/admin.php?page=sm-sessions1,8654.1490.89106.61
Classes /wp-admin/admin.php?page=sm-classes2,8523.9279.6149.78
Inquiries /wp-admin/admin.php?page=sm-staff-inquiries1,7344.2086.7065.74
Dashboard /wp-admin/admin.php?page=sm-staff-dashboard2,9605.06117.5388.88
Roles /wp-admin/admin.php?page=sm-staff-roles1,4483.2273.0549.11
Dashboard /wp-admin/admin.php?page=sm-staff-academic1,1742.7737.3945.41
Settings /wp-admin/admin.php?page=sm-settings2,2142.8238.6736.32
ID Cards /wp-admin/admin.php?page=sm-staff-id-cards1,3613.0547.2040.91
Dashboard /wp-admin/admin.php?page=sm-staff-student1,1802.6638.7742.55
Students /wp-admin/admin.php?page=sm-staff-students2,4773.91101.3775.00

Uninstaller [IO: ▲0.00MB] [DB: ▲0.03MB] 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 were found after uninstall: 17 tables
    • wp_wlsm_subjects
    • wp_wlsm_admin_subject
    • wp_wlsm_invoices
    • wp_wlsm_staff
    • wp_wlsm_admins
    • wp_wlsm_roles
    • wp_wlsm_student_records
    • wp_wlsm_inquiries
    • wp_wlsm_class_school
    • wp_wlsm_sections
    • ...
  • Zombie WordPress options were found after uninstall: 11 options
    • wlsm_current_session
    • widget_wlsm_login_widget
    • widget_wlsm_noticeboard_widget
    • widget_theysaidso_widget
    • widget_recent-comments
    • wlsm_currency
    • wlsm_date_format
    • can_compress_scripts
    • widget_recent-posts
    • db_upgraded
    • ...

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
These server-side errors were triggered
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=sm-staff-roles
    • > POST request to /wp-admin/admin-ajax.php
    • > 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.)
  • 5 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=sm-staff-students
    • > POST request to /wp-admin/admin-ajax.php
    • > Notice in wp-content/plugins/school-management-system/admin/inc/school/staff/general/WLSM_Staff_General.php+768
    Undefined index: order

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 items
  • 2× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/school-management-system/includes/vendor/stripe/stripe-php/update_certs.php
    • > /wp-content/plugins/school-management-system/includes/vendor/stripe/stripe-php/build.php
  • 202× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'Stripe\\Service\\AbstractService' not found in wp-content/plugins/school-management-system/includes/vendor/stripe/stripe-php/lib/Service/PaymentIntentService.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'Stripe\\Service\\AbstractService' not found in wp-content/plugins/school-management-system/includes/vendor/stripe/stripe-php/lib/Service/CouponService.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'Stripe\\Service\\AbstractService' not found in wp-content/plugins/school-management-system/includes/vendor/stripe/stripe-php/lib/Service/ApplePayDomainService.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'Stripe\\ApiResource' not found in wp-content/plugins/school-management-system/includes/vendor/stripe/stripe-php/lib/SubscriptionSchedule.php:32
    • > PHP Fatal error
      Uncaught Error: Class 'Stripe\\ApiResource' not found in wp-content/plugins/school-management-system/includes/vendor/stripe/stripe-php/lib/Coupon.php:32
    • > PHP Fatal error
      Uncaught Error: Class 'Stripe\\Service\\AbstractService' not found in wp-content/plugins/school-management-system/includes/vendor/stripe/stripe-php/lib/Service/Issuing/TransactionService.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'Stripe\\ApiResource' not found in wp-content/plugins/school-management-system/includes/vendor/stripe/stripe-php/lib/Checkout/Session.php:69
    • > PHP Fatal error
      Uncaught Error: Class 'Stripe\\Service\\AbstractService' not found in wp-content/plugins/school-management-system/includes/vendor/stripe/stripe-php/lib/Service/InvoiceItemService.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'Stripe\\ApiResource' not found in wp-content/plugins/school-management-system/includes/vendor/stripe/stripe-php/lib/UsageRecordSummary.php:16
    • > PHP Fatal error
      Uncaught Error: Class 'Stripe\\Service\\AbstractService' not found in wp-content/plugins/school-management-system/includes/vendor/stripe/stripe-php/lib/Service/AccountService.php:7

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser errors were detected

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
Attributes that need to be fixed:
  • Tags: There are too many tags (13 tag instead of maximum 10)
The official readme.txt might help

school-management-system/school-management-system.php 85% from 13 tests

The main PHP file in "The School Management - Education & Learning Management" ver. 4.4 adds more information about the plugin and also serves as the entry point for this plugin
Please make the necessary changes and fix the following:
  • Description: Please don't use more than 140 characters for the plugin description (currently 239 characters long)
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug

Code Analysis 3% from 3 tests

File types 0% from 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
These items require your attention
  • Do not distribute dangerous files with your plugin
    • .crt - Security Certificate in Firefox, IE, Chrome, Safari
      • wp-content/plugins/school-management-system/includes/vendor/stripe/stripe-php/data/ca-certificates.crt
43,790 lines of code in 424 files:
LanguageFilesBlank linesComment linesLines of code
PHP3805,71110,74128,039
SVG30128,889
JavaScript122361942,767
PO File16931,4231,436
CSS19251481,300
Markdown370801,181
JSON300121
XML10031
make18023
YAML1003

PHP code 50% from 2 tests

An overview of cyclomatic complexity and code structure
It is recommended to fix the following
  • Cyclomatic complexity of methods should be reduced to less than 100 (currently 120)
Cyclomatic complexity
Average complexity per logical line of code0.28
Average class complexity10.20
▷ Minimum class complexity1.00
▷ Maximum class complexity655.00
Average method complexity3.06
▷ Minimum method complexity1.00
▷ Maximum method complexity120.00
Code structure
Namespaces25
Interfaces9
Traits7
Classes254
▷ Abstract classes103.94%
▷ Concrete classes24496.06%
▷ Final classes10.41%
Methods1,171
▷ Static methods57148.76%
▷ Public methods1,09093.08%
▷ Protected methods322.73%
▷ Private methods494.18%
Functions27
▷ Named functions311.11%
▷ Anonymous functions2488.89%
Constants821
▷ Global constants485.85%
▷ Class constants77394.15%
▷ Public constants773100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
1 compressed PNG file occupies 0.00MB
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/css/icons.png0.47KB0.49KB0.00%