89% cpj-calendar-appointment-scheduler

Code Review | CPJ Calendar Appointment Scheduler

WordPress plugin CPJ Calendar Appointment Scheduler scored89%from 54 tests.

About plugin

  • Plugin page: cpj-calendar-appo...
  • Plugin version: 2.0.0
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 6.1-6.2.2
  • WordPress version: 6.3.1
  • First release: Apr 25, 2023
  • Latest release: Jun 26, 2023
  • Number of updates: 18
  • Update frequency: every 3.4 days
  • Top authors: cpauljarvis (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /378 total downloads

Benchmarks

Plugin footprint 83% 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.21MB] [CPU: ▼5.26ms] Passed 4 tests

This is a short check of server-side resources used by CPJ Calendar Appointment Scheduler
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.69 ▲0.2340.41 ▲2.93
Dashboard /wp-admin3.52 ▲0.1750.65 ▼8.11
Posts /wp-admin/edit.php3.64 ▲0.2844.35 ▼1.64
Add New Post /wp-admin/post-new.php6.13 ▲0.2482.50 ▼14.23
Media Library /wp-admin/upload.php3.45 ▲0.2136.61 ▲2.93
CPJ Appt Time Settings /wp-admin/admin.php?page=cpj-appt-schedule-time-settings3.4151.84
CPJ Appt Schedule Admin /wp-admin/admin.php?page=cpj-appt-schedule-admin-menu3.4136.45
CPJ Appt E-mail Settings /wp-admin/admin.php?page=cpj-appt-schedule-email-settings3.4836.74

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

Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 25 new files
Database: 4 new tables, 6 new options
New tables
wp_cpj_appt_email_content
wp_cpj_schedule_day_time
wp_cpj_appt_schedule
wp_cpj_appt_users
New WordPress options
widget_recent-posts
can_compress_scripts
theysaidso_admin_options
widget_theysaidso_widget
db_upgraded
widget_recent-comments

Browser metrics Passed 4 tests

An overview of browser requirements for CPJ Calendar Appointment Scheduler
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,938 ▲20313.86 ▼0.509.77 ▲8.2343.14 ▲4.92
Dashboard /wp-admin2,239 ▲595.62 ▼0.0687.32 ▼0.6341.98 ▼1.83
Posts /wp-admin/edit.php2,144 ▲442.06 ▲0.1034.87 ▼1.2834.70 ▼1.45
Add New Post /wp-admin/post-new.php6,407 ▲4,87927.81 ▲4.60908.78 ▲255.6938.37 ▼13.32
Media Library /wp-admin/upload.php1,444 ▲444.24 ▲0.0595.19 ▼1.1140.62 ▼1.62
CPJ Appt Time Settings /wp-admin/admin.php?page=cpj-appt-schedule-time-settings1,3692.1229.6733.77
CPJ Appt Schedule Admin /wp-admin/admin.php?page=cpj-appt-schedule-admin-menu9272.1628.6128.19
CPJ Appt E-mail Settings /wp-admin/admin.php?page=cpj-appt-schedule-email-settings1,6036.77133.4057.41

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
Please fix the following items
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-comments
    • db_upgraded
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-posts

Smoke tests Passed 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 Passed 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
Congratulations! This plugin passed the SRP test

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There were no browser issues found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
3 plugin tags: appointment scheduler, block, calendar

cpj-calendar-appointment-scheduler/cpj-calendar-schedule.php 77% from 13 tests

"CPJ Calendar Appointment Scheduler" version 2.0.0's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
Please make the necessary changes and fix the following:
  • Description: Please don't use more than 140 characters for the plugin description (currently 882 characters long)
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("cpj-calendar-appointment-scheduler.php" instead of "cpj-calendar-schedule.php")
  • 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 Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
No dangerous file extensions were detected18,861 lines of code in 23 files:
LanguageFilesBlank linesComment linesLines of code
JSON40016,137
PHP5545461,102
CSS54027882
JavaScript730595683
Sass23057

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.15
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions33
▷ Named functions33100.00%
▷ Anonymous functions00.00%
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 images were found in this plugin