10% course-booking-system-extension

Code Review | Course Booking System Extension

WordPress plugin Course Booking System Extension scored 10% from 54 tests.

About plugin

  • Plugin page: course-booking-sy...
  • Plugin version: 0.0.19
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.7.2-5.8
  • WordPress version: 5.8.1
  • First release: Jul 12, 2021
  • Latest release: Oct 4, 2021
  • Number of updates: 26
  • Update frequency: every 3.3 days
  • Top authors: codesport (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 222 total downloads

Benchmarks

Plugin footprint 75% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Please fix the following installer errors
  • The plugin did not install without errors
    • > Warning in wp-content/plugins/course-booking-system-extension/course-booking-system-extension.php+22
    require_once(wp-content/plugins/course-booking-system-extension/../course-booking-system/includes/functions.php): failed to open stream: No such file or directory

Server metrics [RAM: ▼0.00MB] [CPU: ▼143.00ms] Passed 4 tests

Analyzing server-side resources used by Course Booking System Extension
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /2.84 ▲0.0035.47 ▲1.99
Dashboard /wp-admin3.06 ▲0.0051.04 ▲5.62
Posts /wp-admin/edit.php3.11 ▲0.0048.35 ▼0.04
Add New Post /wp-admin/post-new.php5.42 ▼0.0295.91 ▼571.94
Media Library /wp-admin/upload.php3.00 ▲0.0033.75 ▼1.99

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

Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 21 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

Checking browser requirements for Course Booking System Extension
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,702 ▲13015.90 ▲0.338.35 ▼0.6647.91 ▼0.45
Dashboard /wp-admin2,962 ▲285.87 ▼0.10142.22 ▼9.94102.99 ▼8.87
Posts /wp-admin/edit.php2,739 ▼02.69 ▼0.0169.06 ▼1.0293.91 ▼3.97
Add New Post /wp-admin/post-new.php1,683 ▼018.74 ▲0.26377.34 ▼16.74114.44 ▲2.87
Media Library /wp-admin/upload.php1,807 ▼05.01 ▼0.00166.49 ▼2.92127.00 ▲0.54

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
The plugin uninstalled completely, with no zombie files or tables

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Good news, no errors were detected

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
The following issues need your attention
  • 21× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Notice
      Trying to get property 'course_id' of non-object in wp-content/plugins/course-booking-system-extension/templates/shortcodes/cbse_event_head_courses-single.php on line 16
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/course-booking-system-extension/includes/cron.php:5
    • > PHP Notice
      Undefined variable: args in wp-content/plugins/course-booking-system-extension/templates/shortcodes/cbse_event_head_courses-single.php on line 16
    • > PHP Notice
      Trying to get property 'date' of non-object in wp-content/plugins/course-booking-system-extension/templates/shortcodes/cbse_event_head_courses-single.php on line 3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function CBSE\\add_action() in wp-content/plugins/course-booking-system-extension/includes/admin/UserCovid19Status.php:9
    • > PHP Notice
      Trying to get property 'column' of non-object in wp-content/plugins/course-booking-system-extension/templates/shortcodes/cbse_event_head_courses-single.php on line 17
    • > PHP Fatal error
      Uncaught Error: Class 'TCPDF' not found in wp-content/plugins/course-booking-system-extension/includes/CBSE_PDF.php:4
    • > PHP Notice
      Undefined variable: args in wp-content/plugins/course-booking-system-extension/templates/shortcodes/cbse_event_head_courses-single.php on line 3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function CBSE\\add_shortcode() in wp-content/plugins/course-booking-system-extension/includes/ShortcodeUserCovid19Status.php:36
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/course-booking-system-extension/templates/shortcodes/cbse_event_head_courses-single.php:18

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 97% from 29 tests

readme.txt 94% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
These attributes need to be fixed: You can take inspiration from this readme.txt

course-booking-system-extension/course-booking-system-extension.php Passed 13 tests

The primary PHP file in "Course Booking System Extension" version 0.0.19 is used by WordPress to initiate all plugin functionality
35 characters long description:
Extension for Course Booking System

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Everything looks great! No dangerous files found in this plugin1,251 lines of code in 18 files:
LanguageFilesBlank linesComment linesLines of code
PHP142431741,188
JavaScript12235
Markdown18025
CSS1003
HTML1010

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.20
Average class complexity7.33
▷ Minimum class complexity4.00
▷ Maximum class complexity12.00
Average method complexity2.65
▷ Minimum method complexity1.00
▷ Maximum method complexity7.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes6
▷ Abstract classes00.00%
▷ Concrete classes6100.00%
▷ Final classes00.00%
Methods24
▷ Static methods14.17%
▷ Public methods2291.67%
▷ Protected methods00.00%
▷ Private methods28.33%
Functions46
▷ Named functions4086.96%
▷ Anonymous functions613.04%
Constants0
▷ Global constants00.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
No PNG files were detected