72% wp-school-calendar-lite

Code Review | WP School Calendar

WordPress plugin WP School Calendar scored72%from 54 tests.

About plugin

  • Plugin page: wp-school-calenda...
  • Plugin version: 3.7.13
  • PHP compatiblity: 7.3+
  • PHP version: 7.4.16
  • WordPress compatibility: 6.1-6.3
  • WordPress version: 6.3.1
  • First release: Jun 26, 2018
  • Latest release: Nov 2, 2023
  • Number of updates: 52
  • Update frequency: every 37.8 days
  • Top authors: maswib (82.69%)wpschoolcalendar (19.23%)

Code review

54 tests

User reviews

8 reviews

Install metrics

500+ active /16,720 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
This plugin's installer ran successfully

Server metrics [RAM: ▲5.71MB] [CPU: ▲27.24ms] 75% from 4 tests

Analyzing server-side resources used by WP School Calendar
Please take the time to fix the following items
  • Extra RAM: The extra memory usage must be under 5MB (currently 5.71MB on /wp-admin/admin.php?page=freemius)
PageMemory (MB)CPU Time (ms)
Home /9.33 ▲5.8769.77 ▲26.29
Dashboard /wp-admin9.35 ▲6.0581.97 ▲21.74
Posts /wp-admin/edit.php9.35 ▲5.9986.70 ▲39.29
Add New Post /wp-admin/post-new.php10.84 ▲4.95115.01 ▲21.63
Media Library /wp-admin/upload.php9.35 ▲6.1282.41 ▲43.48
Freemius Debug [v.2.6.0] /wp-admin/admin.php?page=freemius9.3569.17

Server storage [IO: ▲3.77MB] [DB: ▲0.00MB] Passed 3 tests

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 242 new files
Database: no new tables, 12 new options
New WordPress options
wpsc_version
widget_recent-posts
widget_widget-wpsc-upcoming-important-dates
widget_theysaidso_widget
fs_active_plugins
db_upgraded
can_compress_scripts
theysaidso_admin_options
wpsc_options
fs_debug_mode
...

Browser metrics Passed 4 tests

A check of browser resources used by WP School Calendar
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,958 ▲19714.22 ▼0.501.63 ▼0.2328.53 ▼16.73
Dashboard /wp-admin2,354 ▲1745.58 ▼0.0988.61 ▼8.8339.57 ▼8.23
Posts /wp-admin/edit.php2,270 ▲1702.01 ▲0.0137.75 ▲2.1837.27 ▲3.48
Add New Post /wp-admin/post-new.php1,543 ▲1723.40 ▲0.18691.62 ▲0.6562.50 ▲12.15
Media Library /wp-admin/upload.php1,557 ▲1574.25 ▲0.0898.61 ▼0.1044.11 ▼4.55
Freemius Debug [v.2.6.0] /wp-admin/admin.php?page=freemius1,2271.7024.6229.04

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
It is recommended to fix the following
  • The plugin did not uninstall gracefully
    • > Notice in wp-content/plugins/wp-school-calendar-lite/includes/freemius/includes/class-freemius.php+8546
    Undefined property: stdClass::$plugins
  • This plugin did not uninstall successfully, leaving 12 options in the database
    • widget_widget-wpsc-upcoming-important-dates
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_theysaidso_widget
    • wpsc_version
    • db_upgraded
    • fs_active_plugins
    • fs_debug_mode
    • can_compress_scripts
    • ...

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

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

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
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/wp-school-calendar-lite/includes/widget.php:2

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
No browser issues were found

Optimizations

Plugin configuration 86% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
5 plugin tags: online courses, elearning, calendar, education, events

wp-school-calendar-lite/wp-school-calendar.php 69% from 13 tests

"WP School Calendar" version 3.7.13's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
The following require your attention:
  • Domain Path: Note that the domain path follows the same naming rules as the domain name, using only dashes and lowercase characters ("languages")
  • Domain Path: Prefix the domain path with a forward slash character ("/languages")
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug
  • Main file name: Name the main plugin file the same as the plugin slug ("wp-school-calendar-lite.php" instead of "wp-school-calendar.php")

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
There were no executable files found in this plugin40,974 lines of code in 172 files:
LanguageFilesBlank linesComment linesLines of code
PHP1349,12618,00037,905
CSS25249762,470
JavaScript1311969599

PHP code 50% from 2 tests

This plugin's cyclomatic complexity and code structure detailed below
Please tend to the following items
  • Class cyclomatic complexity has to be reduced to less than 1000 (currently 3,096)
Cyclomatic complexity
Average complexity per logical line of code0.59
Average class complexity75.94
▷ Minimum class complexity1.00
▷ Maximum class complexity3,096.00
Average method complexity4.54
▷ Minimum method complexity1.00
▷ Maximum method complexity94.00
Code structure
Namespaces0
Interfaces1
Traits0
Classes63
▷ Abstract classes23.17%
▷ Concrete classes6196.83%
▷ Final classes00.00%
Methods1,381
▷ Static methods21115.28%
▷ Public methods97270.38%
▷ Protected methods171.23%
▷ Private methods39228.39%
Functions174
▷ Named functions174100.00%
▷ Anonymous functions00.00%
Constants150
▷ Global constants10368.67%
▷ Class constants4731.33%
▷ Public constants47100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
12 PNG files occupy 0.21MB with 0.12MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/chevron-down.png0.21KB0.17KB▼ 19.44%
assets/images/gutenberg-plus.png4.90KB2.53KB▼ 48.29%
assets/images/calendar-block.png14.18KB5.42KB▼ 61.75%
assets/images/wp-school-calendar.png90.21KB27.00KB▼ 70.06%
assets/images/builder.png86.77KB25.48KB▼ 70.64%