84% appointment-booking-calendar-by-click4time

Code Review | Click4Time Calendar

WordPress plugin Click4Time Calendar scored 84% from 54 tests.

About plugin

  • Plugin page: appointment-booki...
  • Plugin version: 2.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 2.0-3.5.1
  • WordPress version: 5.9.2
  • First release: May 16, 2013
  • Latest release: Feb 10, 2014
  • Number of updates: 21
  • Update frequency: every 13.1 days
  • Top authors: click4time (100%)

Code review

54 tests

User reviews

6 reviews

Install metrics

10+ active / 2,972 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
This plugin's installer ran successfully

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

Analyzing server-side resources used by Click4Time Calendar
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.56 ▲0.0561.68 ▲4.24
Dashboard /wp-admin3.43 ▲0.0234.80 ▲0.76
Posts /wp-admin/edit.php3.66 ▲0.0241.31 ▼3.17
Add New Post /wp-admin/post-new.php6.90 ▼0.0798.95 ▼1,202.66
Media Library /wp-admin/upload.php3.31 ▲0.0228.23 ▼9.93

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

Filesystem and database footprint
This plugin was installed successfully
Filesystem: 43 new files
Database: 1 new table, no new options
New tables
wp_c4t_calendar

Browser metrics Passed 4 tests

A check of browser resources used by Click4Time Calendar
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,791 ▲3715.99 ▲0.206.80 ▲1.142.36 ▼0.48
Dashboard /wp-admin2,891 ▲376.12 ▼0.03125.16 ▼14.77215.29 ▲33.53
Posts /wp-admin/edit.php2,708 ▲233.24 ▲0.0163.70 ▼0.14139.92 ▼0.88
Add New Post /wp-admin/post-new.php1,674 ▼7815.65 ▼5.28405.23 ▼63.73162.91 ▼10.19
Media Library /wp-admin/upload.php1,721 ▲265.60 ▲0.08151.18 ▲9.35219.91 ▲25.29

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
The following items require your attention
  • This plugin does not fully uninstall, leaving 1 table in the database
    • wp_c4t_calendar

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 no errors were found, this is by no means an exhaustive test

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
Please take a closer look at the following
  • 2× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/appointment-booking-calendar-by-click4time/book_now.php:12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function load_plugin_textdomain() in wp-content/plugins/appointment-booking-calendar-by-click4time/click4time.php:14

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
6 plugin tags: calendar, calendars, appointment booking, click4time, dates...

appointment-booking-calendar-by-click4time/book_now.php 92% from 13 tests

"Click4Time Calendar" version 2.0.1's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
The following require your attention:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("appointment-booking-calendar-by-click4time.php" instead of "book_now.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Good job! No executable or dangerous file extensions detected254 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP22136254

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.55
Average class complexity23.00
▷ Minimum class complexity23.00
▷ Maximum class complexity23.00
Average method complexity8.33
▷ Minimum method complexity1.00
▷ Maximum method complexity21.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods3
▷ Static methods00.00%
▷ Public methods3100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions6
▷ Named functions6100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
36 PNG files occupy 0.25MB with 0.11MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/buttons/small_green.png2.82KB1.86KB▼ 34.10%
images/buttons/large_red.png13.42KB5.95KB▼ 55.66%
images/buttons/small_wood.png5.59KB2.99KB▼ 46.52%
images/buttons/large_wood.png19.54KB8.53KB▼ 56.33%
images/buttons/small_purple.png3.86KB2.47KB▼ 36.02%