74% easy-school-registration

Code Review | Easy School Registration

WordPress plugin Easy School Registration scored74%from 54 tests.

About plugin

  • Plugin page: easy-school-regis...
  • Plugin version: 3.9.7
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Aug 25, 2022
  • Latest release: Oct 28, 2023
  • Number of updates: 11
  • Update frequency: every 39.1 days
  • Top authors: Domaneni (100%)

Code review

54 tests

User reviews

1 review

Install metrics

30+ active /982 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
Installer ran successfully

Server metrics [RAM: ▲3.45MB] [CPU: ▲27.25ms] Passed 4 tests

An overview of server-side resources used by Easy School Registration
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /6.75 ▲3.2865.68 ▲28.67
Dashboard /wp-admin6.86 ▲3.56106.93 ▲59.09
Posts /wp-admin/edit.php6.89 ▲3.5462.90 ▲23.14
Add New Post /wp-admin/post-new.php9.37 ▲3.49116.28 ▲28.53
Media Library /wp-admin/upload.php6.70 ▲3.4763.21 ▲28.66

Server storage [IO: ▲5.24MB] [DB: ▲0.01MB] Passed 3 tests

Filesystem and database footprint
This plugin was installed successfully
Filesystem: 181 new files
Database: 8 new tables, 8 new options
New tables
wp_esr_course_summary
wp_esr_user_payment
wp_esr_teacher_data
wp_esr_course_dates
wp_esr_course_registration
wp_esr_course_data
wp_esr_wave_data
wp_esr_log
New WordPress options
widget_recent-posts
esr_settings
db_upgraded
can_compress_scripts
esr_db_version
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-comments

Browser metrics Passed 4 tests

Checking browser requirements for Easy School Registration
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,878 ▲11714.14 ▼0.591.76 ▲0.0943.55 ▲5.17
Dashboard /wp-admin2,281 ▲1075.58 ▲0.0184.31 ▼6.3937.45 ▼1.75
Posts /wp-admin/edit.php2,186 ▲862.01 ▼0.0140.21 ▲3.6441.01 ▲10.63
Add New Post /wp-admin/post-new.php6,447 ▲4,91822.63 ▼0.46946.64 ▲276.6743.71 ▼3.61
Media Library /wp-admin/upload.php1,486 ▲864.23 ▲0.05105.49 ▼7.7144.00 ▼4.25

Uninstaller [IO: ▲0.00MB] [DB: ▲0.01MB] 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 8 tables in the database
    • wp_esr_course_dates
    • wp_esr_teacher_data
    • wp_esr_course_data
    • wp_esr_wave_data
    • wp_esr_log
    • wp_esr_course_registration
    • wp_esr_user_payment
    • wp_esr_course_summary
  • This plugin does not fully uninstall, leaving 8 options in the database
    • widget_recent-comments
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • esr_db_version
    • db_upgraded
    • can_compress_scripts
    • esr_settings
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP 50% 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
Please fix the following
  • 5× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/easy-school-registration/inc/class/esr-tiny-mce.php:9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/easy-school-registration/inc/cron/esr-payment-reminder-email.cron.php:87
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/easy-school-registration/inc/cron/esr-payment-email.cron.php:108
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/easy-school-registration/inc/cron/esr-waiting-email.cron.php:87
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_site_option() in wp-content/plugins/easy-school-registration/inc/database/updates/esr-update.3.9.3.php:2

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser errors were detected

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
These attributes need to be fixed:
  • Screenshots: Screenshot #3 (Course in numbers administration page) image required
Please take inspiration from this readme.txt

easy-school-registration/easy-school-registration.php Passed 13 tests

The main PHP script in "Easy School Registration" version 3.9.7 is automatically included on every request by WordPress
40 characters long description:
Tools to help you run your school better

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
There were no executable files found in this plugin28,599 lines of code in 167 files:
LanguageFilesBlank linesComment linesLines of code
PO File113,35420,03413,403
PHP1342,65884712,931
JavaScript203214452,116
SVG303130
CSS9132119

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.41
Average class complexity12.36
▷ Minimum class complexity1.00
▷ Maximum class complexity96.00
Average method complexity3.29
▷ Minimum method complexity1.00
▷ Maximum method complexity47.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes131
▷ Abstract classes00.00%
▷ Concrete classes131100.00%
▷ Final classes10.76%
Methods651
▷ Static methods32850.38%
▷ Public methods58790.17%
▷ Protected methods00.00%
▷ Private methods649.83%
Functions6
▷ Named functions6100.00%
▷ Anonymous functions00.00%
Constants34
▷ Global constants617.65%
▷ Class constants2882.35%
▷ Public constants28100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
5 compressed PNG files occupy 0.00MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
libs/datatable/images/sort_desc_disabled.png0.14KB0.25KB0.00%
libs/datatable/images/sort_both.png0.20KB0.29KB0.00%
libs/datatable/images/sort_desc.png0.15KB0.25KB0.00%
libs/datatable/images/sort_asc.png0.16KB0.25KB0.00%
libs/datatable/images/sort_asc_disabled.png0.14KB0.25KB0.00%