62% easy-appointments

Code Review | Easy Appointments

WordPress plugin Easy Appointments scored 62% from 54 tests.

About plugin

  • Plugin page: easy-appointments
  • Plugin version: 3.11.11
  • PHP compatiblity: 5.3+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.7-6.3
  • WordPress version: 6.3.1
  • First release: May 29, 2015
  • Latest release: Aug 13, 2023
  • Number of updates: 451
  • Update frequency: every 6.7 days
  • Top authors: loncar (100%)

Code review

54 tests

User reviews

126 reviews

Install metrics

20,000+ active / 1,329,345 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲1.19MB] [CPU: ▲10.83ms] Passed 4 tests

A check of server-side resources used by Easy Appointments
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /4.48 ▲1.0241.74 ▲2.62
Dashboard /wp-admin4.53 ▲1.2355.73 ▲9.10
Posts /wp-admin/edit.php4.65 ▲1.2964.56 ▲16.22
Add New Post /wp-admin/post-new.php7.26 ▲1.37109.58 ▲15.38
Media Library /wp-admin/upload.php4.45 ▲1.2351.93 ▲17.95
Reports *OLD* /wp-admin/admin.php?page=easy_app_reports4.4448.46
Vacation /wp-admin/admin.php?page=easy_app_vacation4.4445.00
1. Locations /wp-admin/admin.php?page=easy_app_locations4.4344.59
3. Employees /wp-admin/admin.php?page=easy_app_workers4.4343.54
4. Connections /wp-admin/admin.php?page=easy_app_connections4.4444.10
5. Settings /wp-admin/admin.php?page=easy_app_settings4.6546.45
6. Tools /wp-admin/admin.php?page=easy_app_tools4.4446.99
Reports *NEW* /wp-admin/admin.php?page=easy_app_new_reports4.5246.07
2. Services /wp-admin/admin.php?page=easy_app_services4.4341.84
Appointments /wp-admin/admin.php?page=easy_app_top_level4.4746.53

Server storage [IO: ▲9.78MB] [DB: ▲0.01MB] Passed 3 tests

Input-output and database impact of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 396 new files
Database: 9 new tables, 7 new options
New tables
wp_ea_meta_fields
wp_ea_error_logs
wp_ea_services
wp_ea_options
wp_ea_locations
wp_ea_fields
wp_ea_connections
wp_ea_appointments
wp_ea_staff
New WordPress options
widget_recent-comments
db_upgraded
easy_app_db_version
widget_recent-posts
theysaidso_admin_options
can_compress_scripts
widget_theysaidso_widget

Browser metrics Passed 4 tests

This is an overview of browser requirements for Easy Appointments
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,855 ▲12013.22 ▼1.164.39 ▲2.2841.61 ▼8.45
Dashboard /wp-admin2,258 ▲735.77 ▲0.8497.18 ▼4.3442.04 ▼10.53
Posts /wp-admin/edit.php2,147 ▲552.01 ▲0.0242.03 ▲2.8236.71 ▲4.59
Add New Post /wp-admin/post-new.php1,585 ▲4323.28 ▲4.51681.84 ▲36.2956.87 ▼12.77
Media Library /wp-admin/upload.php1,446 ▲614.16 ▼0.08100.95 ▼13.3044.33 ▼5.33
Reports *OLD* /wp-admin/admin.php?page=easy_app_reports9292.9050.7835.07
Vacation /wp-admin/admin.php?page=easy_app_vacation1,1498.62181.55106.12
1. Locations /wp-admin/admin.php?page=easy_app_locations1,1318.47198.4554.92
3. Employees /wp-admin/admin.php?page=easy_app_workers1,1368.6078.6950.85
4. Connections /wp-admin/admin.php?page=easy_app_connections1,1478.7579.7552.01
5. Settings /wp-admin/admin.php?page=easy_app_settings3,1088.15152.8338.08
6. Tools /wp-admin/admin.php?page=easy_app_tools1,1828.8582.7562.84
Reports *NEW* /wp-admin/admin.php?page=easy_app_new_reports1,0447.8774.0347.41
2. Services /wp-admin/admin.php?page=easy_app_services1,1348.4275.0847.47
Appointments /wp-admin/admin.php?page=easy_app_top_level2,0304.1672.3532.75

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
It is recommended to fix the following
  • This plugin does not fully uninstall, leaving 1 table in the database
    • wp_ea_error_logs
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-posts
    • widget_theysaidso_widget
    • can_compress_scripts
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-comments

Smoke tests 25% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP 0% 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
Almost there! Just fix the following items
  • 11× PHP files perform the task of outputting text when accessed with GET requests (only 10 are shown):
    • > /wp-content/plugins/easy-appointments/src/templates/connections.tpl.php
    • > /wp-content/plugins/easy-appointments/src/templates/services.tpl.php
    • > /wp-content/plugins/easy-appointments/src/templates/workers.tpl.php
    • > /wp-content/plugins/easy-appointments/src/templates/booking.overview.tpl.php
    • > /wp-content/plugins/easy-appointments/src/templates/reports.tpl.php
    • > /wp-content/plugins/easy-appointments/src/templates/locations.tpl.php
    • > /wp-content/plugins/easy-appointments/src/templates/phone.field.tpl.php
    • > /wp-content/plugins/easy-appointments/src/templates/asp_tag_message.tpl.php
    • > /wp-content/plugins/easy-appointments/src/templates/phone.list.tpl.php
    • > /wp-content/plugins/easy-appointments/src/templates/vacation.tpl.php
  • 24× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function admin_url() in wp-content/plugins/easy-appointments/src/templates/ea_bootstrap.tpl.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_current_screen() in wp-content/plugins/easy-appointments/src/templates/appointments.tpl.php:3
    • > PHP Warning
      require_once(wp-content/plugins/easy-appointments/vendor/lucatume/di52/vendor/autoload_52.php): failed to open stream: No such file or directory in wp-content/plugins/easy-appointments/vendor/lucatume/di52/tests/bootstrap.php on line 2
    • > PHP Fatal error
      Uncaught Error: Class 'Leuffen\\TextTemplate\\TextTemplate' not found in wp-content/plugins/easy-appointments/vendor/text/template/src/buildInFilters.inc.php:12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function admin_url() in wp-content/plugins/easy-appointments/src/templates/ea_bootstrap_rtl.tpl.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit_Framework_TestCase' not found in wp-content/plugins/easy-appointments/vendor/lucatume/di52/tests/52-compat/autoloadTest.php:4
    • > PHP Fatal error
      Uncaught Error: Class 'Leuffen\\TextTemplate\\TemplateParsingException' not found in wp-content/plugins/easy-appointments/vendor/text/template/src/UndefinedVariableException.php:14
    • > PHP Fatal error
      Uncaught Error: Interface 'tad_DI52_ServiceProviderInterface' not found in wp-content/plugins/easy-appointments/vendor/lucatume/di52/src/tad/DI52/ServiceProvider.php:7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_current_screen() in wp-content/plugins/easy-appointments/src/templates/admin.tpl.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'Jaybizzle\\CrawlerDetect\\Fixtures\\AbstractProvider' not found in wp-content/plugins/easy-appointments/vendor/jaybizzle/crawler-detect/src/Fixtures/Exclusions.php:14

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
There are user-side issues you should fix
    • > GET request to /wp-admin/admin.php?page=easy_app_reports
    • > Network (severe)
    wp-content/plugins/easy-appointments/fonts/roboto/Roboto-Regular-webfont.woff2 - Failed to load resource: the server responded with a status of 404 (Not Found)

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
10 plugin tags: booking, reservations, reservation plugin, appointment, schedule...

easy-appointments/main.php 92% from 13 tests

Analyzing the main PHP file in "Easy Appointments" version 3.11.11
The following require your attention:
  • Main file name: The principal plugin file should be the same as the plugin slug ("easy-appointments.php" instead of "main.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Everything looks great! No dangerous files found in this plugin74,201 lines of code in 283 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript742,4993,62324,782
CSS2660057118,947
PHP1033,0493,38112,813
PO File175,0387,41112,040
SVG16493,050
Markdown63590918
Sass31062680
Bourne Shell113848446
JSON2700360
YAML526358
HTML19143
make16032
XML10017
Ant14312
INI1003

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.22
Average class complexity8.65
▷ Minimum class complexity1.00
▷ Maximum class complexity102.00
Average method complexity2.45
▷ Minimum method complexity1.00
▷ Maximum method complexity56.00
Code structure
Namespaces7
Interfaces12
Traits0
Classes100
▷ Abstract classes33.00%
▷ Concrete classes9797.00%
▷ Final classes00.00%
Methods617
▷ Static methods467.46%
▷ Public methods56892.06%
▷ Protected methods132.11%
▷ Private methods365.83%
Functions92
▷ Named functions99.78%
▷ Anonymous functions8390.22%
Constants6
▷ Global constants583.33%
▷ Class constants116.67%
▷ Public constants1100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
6 PNG files occupy 0.08MB with 0.04MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
img/label-inline.png8.08KB2.11KB▼ 73.85%
img/chosen-sprite.png0.53KB0.88KB0.00%
img/label-from.png27.96KB7.13KB▼ 74.49%
css/images/ui-icons_222222_256x240.png4.27KB4.11KB▼ 3.78%
img/label-above.png10.00KB3.00KB▼ 70.00%