73% calendarista-basic-edition

Code Review | Calendarista Basic Edition - WordPress appointment booking system

WordPress plugin Calendarista Basic Edition - WordPress appointment booking system scored73%from 54 tests.

About plugin

  • Plugin page: calendarista-basi...
  • Plugin version: 3.0
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.6-6.4
  • WordPress version: 6.3.1
  • First release: Apr 26, 2018
  • Latest release: Oct 25, 2023
  • Number of updates: 25
  • Update frequency: every 80.3 days
  • Top authors: typps (100%)

Code review

54 tests

User reviews

5 reviews

Install metrics

100+ active /7,460 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Install script ran successfully

Server metrics [RAM: ▲0.60MB] [CPU: ▲7.36ms] 75% from 4 tests

Analyzing server-side resources used by Calendarista Basic Edition - WordPress appointment booking system
Please have a look at the following items
  • CPU: Try to keep total CPU usage under 500.00ms (currently 502.97ms on /wp-admin/admin.php?page=calendarista-sales)
PageMemory (MB)CPU Time (ms)
Home /4.05 ▲0.5944.07 ▲5.61
Dashboard /wp-admin3.90 ▲0.6053.65 ▲6.41
Posts /wp-admin/edit.php3.96 ▲0.6054.05 ▲8.59
Add New Post /wp-admin/post-new.php6.48 ▲0.6096.32 ▲8.81
Media Library /wp-admin/upload.php3.83 ▲0.6061.73 ▲27.68
Services /wp-admin/admin.php?page=calendarista-index4.24504.19
Places /wp-admin/admin.php?page=calendarista-places4.11500.20
Settings /wp-admin/admin.php?page=calendarista-settings4.45510.41
Setup Wizard /wp-admin/admin.php?page=calendarista-setup4.08514.84
Appointments /wp-admin/admin.php?page=calendarista-appointments4.16491.36
Sales /wp-admin/admin.php?page=calendarista-sales4.67502.97

Server storage [IO: ▲9.07MB] [DB: ▲0.05MB] Passed 3 tests

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 667 new files
Database: 40 new tables, 7 new options
New tables
wp_calendarista_tags
wp_calendarista_settings
wp_calendarista_formelement
wp_calendarista_error_log
wp_calendarista_season
wp_calendarista_place
wp_calendarista_tags_availability
wp_calendarista_formelement_booked
wp_calendarista_roles
wp_calendarista_waypoint
...
New WordPress options
calendarista_db_version
can_compress_scripts
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-posts
db_upgraded
widget_recent-comments

Browser metrics Passed 4 tests

Calendarista Basic Edition - WordPress appointment booking system: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,019 ▲23314.88 ▲0.1024.15 ▲22.3238.05 ▼3.69
Dashboard /wp-admin2,237 ▲575.55 ▼0.1289.32 ▲4.7940.98 ▲1.69
Posts /wp-admin/edit.php2,145 ▲452.00 ▲0.0339.67 ▲2.0735.11 ▲0.11
Add New Post /wp-admin/post-new.php1,562 ▲2623.55 ▲5.43608.82 ▼17.4854.07 ▼12.86
Media Library /wp-admin/upload.php1,442 ▲424.17 ▼0.05135.01 ▲37.6152.16 ▲9.75
Services /wp-admin/admin.php?page=calendarista-index1,5745.1274.5138.39
Places /wp-admin/admin.php?page=calendarista-places1,0904.1247.3922.90
Settings /wp-admin/admin.php?page=calendarista-settings2,4945.5083.7833.26
Setup Wizard /wp-admin/admin.php?page=calendarista-setup1,1743.2336.6961.58
Appointments /wp-admin/admin.php?page=calendarista-appointments1,9714.4487.2393.79
Sales /wp-admin/admin.php?page=calendarista-sales1,2803.3352.9584.64

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • The uninstall procedure failed, leaving 40 tables in the database
    • wp_calendarista_formelement
    • wp_calendarista_dynamic_field_booked
    • wp_calendarista_waypoint_booked
    • wp_calendarista_staging
    • wp_calendarista_feeds
    • wp_calendarista_coupons
    • wp_calendarista_timeslot
    • wp_calendarista_settings
    • wp_calendarista_optional_group
    • wp_calendarista_staff
    • ...
  • Zombie WordPress options detected upon uninstall: 7 options
    • calendarista_db_version
    • widget_recent-comments
    • widget_recent-posts
    • can_compress_scripts
    • theysaidso_admin_options
    • db_upgraded
    • widget_theysaidso_widget

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 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
The following issues need your attention
  • 233× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'Calendarista_BaseController' not found in wp-content/plugins/calendarista-basic-edition/lib/controller/AppointmentsController.php:2
    • > PHP Fatal error
      Uncaught Error: Class 'Calendarista_RepositoryBase' not found in wp-content/plugins/calendarista-basic-edition/lib/domainmodel/repository/DynamicFieldPricingRepository.php:2
    • > PHP Fatal error
      Uncaught Error: Class 'Calendarista_EntityBase' not found in wp-content/plugins/calendarista-basic-edition/lib/domainmodel/entities/ErrorLog.php:2
    • > PHP Fatal error
      Uncaught Error: Class 'Calendarista_List' not found in wp-content/plugins/calendarista-basic-edition/lib/infrastructure/ui/lists/CouponsList.php:2
    • > PHP Fatal error
      Uncaught Error: Class 'Calendarista_List' not found in wp-content/plugins/calendarista-basic-edition/lib/infrastructure/ui/lists/AvailabilityDayList.php:2
    • > PHP Fatal error
      Uncaught Error: Class 'Calendarista_TemplateBase' not found in wp-content/plugins/calendarista-basic-edition/lib/views/partials/RepeatItemsTmpl.php:2
    • > PHP Fatal error
      Uncaught Error: Class 'Calendarista_CollectionBase' not found in wp-content/plugins/calendarista-basic-edition/lib/domainmodel/entities/Places.php:2
    • > PHP Fatal error
      Uncaught Error: Class 'Calendarista_BaseController' not found in wp-content/plugins/calendarista-basic-edition/lib/controller/SeasonController.php:2
    • > PHP Fatal error
      Uncaught Error: Class 'Calendarista_EntityBase' not found in wp-content/plugins/calendarista-basic-edition/lib/domainmodel/entities/Place.php:2
    • > PHP Fatal error
      Uncaught Error: Class 'Calendarista_ViewBase' not found in wp-content/plugins/calendarista-basic-edition/lib/views/partials/admin/AvailabilityTemplate.php:2

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 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
These attributes need your attention: The official readme.txt is a good inspiration

calendarista-basic-edition/CalendaristaBasic.php 92% from 13 tests

The primary PHP file in "Calendarista Basic Edition - WordPress appointment booking system" version 3.0 is used by WordPress to initiate all plugin functionality
The following require your attention:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("calendarista-basic-edition.php" instead of "CalendaristaBasic.php")

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
There were no executable files found in this plugin101,170 lines of code in 577 files:
LanguageFilesBlank linesComment linesLines of code
PHP3281,5133,45754,059
PO File57,11220,88015,018
JavaScript2169211,13613,705
CSS1810514312,751
SVG4003,973
Ant22390969
SQL3430690
XML1005

PHP code 50% from 2 tests

This is a very shot review of cyclomatic complexity and code structure
The following items need your attention
  • Method cyclomatic complexity should be reduced to less than 100 (currently 114)
Cyclomatic complexity
Average complexity per logical line of code0.45
Average class complexity23.39
▷ Minimum class complexity1.00
▷ Maximum class complexity269.00
Average method complexity4.16
▷ Minimum method complexity1.00
▷ Maximum method complexity114.00
Code structure
Namespaces0
Interfaces6
Traits0
Classes320
▷ Abstract classes30.94%
▷ Concrete classes31799.06%
▷ Final classes00.00%
Methods2,315
▷ Static methods28212.18%
▷ Public methods2,01587.04%
▷ Protected methods24310.50%
▷ Private methods572.46%
Functions3
▷ Named functions133.33%
▷ Anonymous functions266.67%
Constants204
▷ Global constants157.35%
▷ Class constants18992.65%
▷ Public constants189100.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
36 PNG files occupy 0.18MB with 0.05MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/css/jquery-ui/smoothness/images/ui-bg_glass_65_ffffff_1x400.png0.20KB0.09KB▼ 57.49%
assets/admin/css/jquery-ui/smoothness/images/ui-icons_222222_256x240.png6.76KB4.17KB▼ 38.24%
assets/admin/css/jquery-ui/smoothness/images/ui-icons_2e83ff_256x240.png4.44KB4.17KB▼ 6.02%
assets/css/jquery-ui/smoothness/images/ui-icons_cd0a0a_256x240.png4.44KB4.17KB▼ 6.02%
assets/css/jquery-ui/smoothness/images/ui-icons_454545_256x240.png6.83KB4.17KB▼ 38.86%