10% wp-appointments

Code Review | Wp Appointments

WordPress plugin Wp Appointments scored 10% from 53 tests.

About plugin

  • Plugin page: wp-appointments
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress version: 5.8.1
  • First release: Nov 10, 2015
  • Latest release: Jan 27, 2016
  • Number of updates: 30
  • Update frequency: every 2.6 days
  • Top authors: webinane (100%)

Code review

53 tests

User reviews

2 reviews

Install metrics

10+ active / 2,488 total downloads

Benchmarks

Plugin footprint 23% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Please fix the following installer errors
  • Install procedure validation failed for this plugin
    • > Warning in wp-content/plugins/wp-appointments/app/init.php+47
    Use of undefined constant BFITHUMB_UPLOAD_DIR - assumed 'BFITHUMB_UPLOAD_DIR' (this will throw an Error in a future version of PHP)

Server metrics [RAM: ▼1.84MB] [CPU: ▼309.89ms] Passed 4 tests

Analyzing server-side resources used by Wp Appointments
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /1.79 ▼0.935.16 ▼15.14
Dashboard /wp-admin1.81 ▼1.246.28 ▼38.98
Posts /wp-admin/edit.php1.81 ▼1.295.61 ▼37.69
Add New Post /wp-admin/post-new.php1.81 ▼3.625.37 ▼1,130.97
Media Library /wp-admin/upload.php1.81 ▼1.194.31 ▼31.91
Appointments /wp-admin/admin.php?page=wst_wp_appointments_app1.815.22
Settings /wp-admin/admin.php?page=wst_app_settings1.815.24

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

Analyzing filesystem and database footprints of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 94 new files
Database: 6 new tables, 1 new option
New tables
wp_wst_appointments
wp_wst_connections
wp_wst_services
wp_wst_staff
wp_wst_locations
wp_wst_options
New WordPress options
wp_appointment_id

Browser metrics Passed 4 tests

Checking browser requirements for Wp Appointments
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,757 ▲15115.85 ▼0.058.06 ▲0.0663.68 ▲16.89
Dashboard /wp-admin2,994 ▲1416.19 ▲0.30142.06 ▲8.5595.46 ▼6.06
Posts /wp-admin/edit.php2,767 ▲642.73 ▲0.0566.83 ▼2.8887.59 ▼8.19
Add New Post /wp-admin/post-new.php1,706 ▲5318.66 ▼0.09354.22 ▼5.99111.30 ▼4.53
Media Library /wp-admin/upload.php1,836 ▲645.05 ▲0.01149.71 ▼11.78106.05 ▼9.69
Appointments /wp-admin/admin.php?page=wst_wp_appointments_app1,3062.4362.2367.24
Settings /wp-admin/admin.php?page=wst_app_settings2,9368.78182.49133.46

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • Uninstall procedure validation failed for this plugin
    • > Warning in wp-content/plugins/wp-appointments/app/init.php+47
    Use of undefined constant BFITHUMB_UPLOAD_DIR - assumed 'BFITHUMB_UPLOAD_DIR' (this will throw an Error in a future version of PHP)
  • Zombie tables detected upon uninstall: 6 tables
    • wp_wst_services
    • wp_wst_options
    • wp_wst_locations
    • wp_wst_appointments
    • wp_wst_connections
    • wp_wst_staff
  • Zombie WordPress options detected upon uninstall: 1 option
    • wp_appointment_id

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Almost there, just fix the following server-side errors
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=wst_app_settings
    • > Warning in wp-content/plugins/wp-appointments/app/init.php+47
    Use of undefined constant BFITHUMB_UPLOAD_DIR - assumed 'BFITHUMB_UPLOAD_DIR' (this will throw an Error in a future version of PHP)
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=wst_app_settings
    • > User deprecated in wp-includes/functions.php+5401
    class-phpmailer.php is deprecated since version 5.5.0! Use wp-includes/PHPMailer/PHPMailer.php instead. The PHPMailer class has been moved to wp-includes/PHPMailer subdirectory and now uses the PHPMailer\PHPMailer namespace.

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
Almost there! Just fix the following items
  • 17× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'WST_DB_Setup' not found in wp-content/plugins/wp-appointments/app/back-end/templates/popup/services.tpl.update.php:2
    • > PHP Fatal error
      Uncaught Error: Class 'WST_DB_Setup' not found in wp-content/plugins/wp-appointments/app/back-end/templates/popup/location.tpl.update.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/wp-appointments/app/back-end/templates/popup/services.tpl.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/wp-appointments/app/back-end/templates/appointment.tpl.php:2
    • > PHP Fatal error
      Uncaught Error: Class 'WST_DB_Setup' not found in wp-content/plugins/wp-appointments/app/back-end/templates/popup/connections.tpl.update.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/wp-appointments/app/back-end/templates/popup/location.tpl.php:5
    • > PHP Fatal error
      require_once(): Failed opening required 'ABSPATH/wp-admin/includes/plugin.php' (include_path='.:/usr/share/php') in wp-content/plugins/wp-appointments/app/init.php on line 40
    • > PHP Fatal error
      Uncaught Error: Call to undefined function admin_url() in wp-content/plugins/wp-appointments/app/back-end/templates/tpl-email.php:13
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/wp-appointments/app/init.php on line 40
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/wp-appointments/app/back-end/templates/popup/staff.tpl.php:5

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Please fix the following user-side errors
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=wst_app_settings
    • > Javascript (severe) in unknown
    /wp-content/plugins/wp-appointments/app/assets/back-end/js/scripts.js?ver=1.0 311:31 Uncaught TypeError: $(...).live is not a function
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=wst_app_settings
    • > Console-api (warning) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=5.8.1 1:31592 "jQuery.Deferred exception: $(...).live is not a function" "TypeError: $(...).live is not a function\n at HTMLDocument.\u003Canonymous> (/wp-content/plugins/wp-appointments/app/assets/back-end/js/scripts.js?ver=1.0:28:32)\n at e (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=5.8.1:2:30038)\n at t (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=5.8.1:2:30340)" undefined
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=wst_app_settings
    • > Javascript (severe) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=5.8.1 1:31702 Uncaught TypeError: $(...).live is not a function
    • > GET request to /wp-admin/admin.php?page=wst_app_settings
    • > Network (severe)
    wp-admin/images/comment-grey-bubble.png' - Failed to load resource: the server responded with a status of 404 (Not Found)

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
Please fix the following attributes:
  • Requires at least: Version format is invalid
The official readme.txt might help

wp-appointments/wp-appointments.php Passed 13 tests

This is the main PHP file of "Wp Appointments" version 1.0, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
68 characters long description:
Advance and modern Appointments managment system powered by Webinane

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Success! There were no dangerous files found in this plugin16,333 lines of code in 80 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript261,2939608,224
PHP273432344,044
CSS164321002,866
HTML9105101,112
SVG10082
Markdown1105

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.38
Average class complexity26.43
▷ Minimum class complexity1.00
▷ Maximum class complexity135.00
Average method complexity4.27
▷ Minimum method complexity1.00
▷ Maximum method complexity91.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes14
▷ Abstract classes00.00%
▷ Concrete classes14100.00%
▷ Final classes00.00%
Methods109
▷ Static methods9587.16%
▷ Public methods10697.25%
▷ Protected methods21.83%
▷ Private methods10.92%
Functions8
▷ Named functions8100.00%
▷ Anonymous functions00.00%
Constants6
▷ Global constants6100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 1 test

Image compression Passed 1 test

PNG files should be compressed to save space and minimize bandwidth usage
1 compressed PNG file occupies 0.00MB
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
app/assets/back-end/img/select2.png0.60KB0.99KB0.00%