73% motopress-appointment-lite

Code Review | WordPress Appointment Booking Plugin

WordPress plugin WordPress Appointment Booking Plugin scored73%from 54 tests.

About plugin

  • Plugin page: motopress-appoint...
  • Plugin version: 1.21.1
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.3-6.4
  • WordPress version: 6.3.1
  • First release: Jan 26, 2022
  • Latest release: Dec 1, 2023
  • Number of updates: 42
  • Update frequency: every 16.1 days
  • Top authors: jetmonsters (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

300+ active /6,095 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
This plugin's installer ran successfully

Server metrics [RAM: ▲4.56MB] [CPU: ▲40.30ms] Passed 4 tests

Analyzing server-side resources used by WordPress Appointment Booking Plugin
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /7.45 ▲3.9981.61 ▲37.52
Dashboard /wp-admin8.04 ▲4.7086.79 ▲27.31
Posts /wp-admin/edit.php8.15 ▲4.7999.39 ▲50.29
Add New Post /wp-admin/post-new.php12.03 ▲6.15156.86 ▲71.71
Media Library /wp-admin/upload.php7.98 ▲4.7580.96 ▲46.07
Service Tags /wp-admin/edit-tags.php?post_type=mpa_service&taxonomy=mpa_service_tag8.1078.80
Service Categories /wp-admin/edit-tags.php?post_type=mpa_service&taxonomy=mpa_service_category8.1076.98
Settings /wp-admin/admin.php?page=mpa_settings8.4284.82

Server storage [IO: ▲31.01MB] [DB: ▲0.04MB] 67% from 3 tests

Input-output and database impact of this plugin
Please try to fix the following items
  • Filesystem usage must be lower than 25MB (currently using 31.01MB)
Filesystem: 2,266 new files
Database: 1 new table, 9 new options
New tables
wp_mpa_customers
New WordPress options
theysaidso_admin_options
widget_recent-posts
mpa_security_version
db_upgraded
widget_recent-comments
widget_theysaidso_widget
mpa_db_version
widget_appointment_form
can_compress_scripts

Browser metrics Passed 4 tests

An overview of browser requirements for WordPress Appointment Booking Plugin
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,932 ▲18514.26 ▼0.131.76 ▼0.2942.05 ▼4.60
Dashboard /wp-admin2,316 ▲1365.62 ▲0.0196.73 ▲2.4846.05 ▲0.72
Posts /wp-admin/edit.php2,218 ▲1181.95 ▼0.0139.44 ▼0.1236.22 ▼0.76
Add New Post /wp-admin/post-new.php1,611 ▲8522.36 ▼1.19669.88 ▲21.4760.80 ▲12.98
Media Library /wp-admin/upload.php1,521 ▲1214.22 ▼0.0697.78 ▼1.2943.83 ▲1.75
Service Tags /wp-admin/edit-tags.php?post_type=mpa_service&taxonomy=mpa_service_tag1,4362.1228.2429.54
Service Categories /wp-admin/edit-tags.php?post_type=mpa_service&taxonomy=mpa_service_category1,4362.1330.9631.30
Settings /wp-admin/admin.php?page=mpa_settings2,9821.8135.6531.95

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
It is recommended to fix the following
  • Zombie tables were found after uninstall: 1 table
    • wp_mpa_customers
  • Zombie WordPress options were found after uninstall: 9 options
    • widget_recent-comments
    • ad21487ff53861accd1a3296c9541e53
    • can_compress_scripts
    • db_upgraded
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • mpa_db_version
    • widget_recent-posts
    • widget_appointment_form

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please fix the following items
  • 80× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'MotoPress\\Appointment\\Gutenberg\\Blocks\\AbstractBlock' not found in wp-content/plugins/motopress-appointment-lite/includes/gutenberg/blocks/EmployeeContactsBlock.php:5
    • > PHP Notice
      Undefined variable: bookings in wp-content/plugins/motopress-appointment-lite/templates/shortcodes/customer-account/bookings.php on line 9
    • > PHP Fatal error
      Uncaught Error: Interface 'MotoPress\\Appointment\\Emails\\Tags\\InterfaceTag' not found in wp-content/plugins/motopress-appointment-lite/includes/emails/tags/InterfaceTags.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'ET_Builder_Module' not found in wp-content/plugins/motopress-appointment-lite/includes/divi/modules/AbstractShortcodeModule.php:11
    • > PHP Fatal error
      Uncaught Error: Interface 'libphonenumber\\MatcherAPIInterface' not found in wp-content/plugins/motopress-appointment-lite/vendor/giggsey/libphonenumber-for-php/src/RegexBasedMatcher.php:10
    • > PHP Fatal error
      Uncaught Error: Class 'MotoPress\\Appointment\\Rest\\Controllers\\AbstractRestObjectController' not found in wp-content/plugins/motopress-appointment-lite/includes/rest/controllers/v1/ReservationsController.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'MotoPress\\Appointment\\Gutenberg\\Blocks\\AbstractBlock' not found in wp-content/plugins/motopress-appointment-lite/includes/gutenberg/blocks/EmployeesListBlock.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'MotoPress\\Appointment\\Rest\\Data\\AbstractPostData' not found in wp-content/plugins/motopress-appointment-lite/includes/rest/data/EmployeeData.php:11
    • > PHP Fatal error
      Uncaught Error: Class 'MotoPress\\Appointment\\Gutenberg\\Blocks\\AbstractBlock' not found in wp-content/plugins/motopress-appointment-lite/includes/gutenberg/blocks/EmployeeSocialNetworksBlock.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'ET_Builder_Module' not found in wp-content/plugins/motopress-appointment-lite/includes/divi/modules/EmployeeSocialNetworksModule.php:7

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 87% from 29 tests

readme.txt 88% from 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
These attributes need your attention:
  • Screenshots: These screenshots lack descriptions #1, #10, #2, #3, #4, #5, #6, #7, #8, #9 in motopress-appointment-lite/assets to your readme.txt
  • Tags: Please delete some tags, you are using 11 tag instead of maximum 10
Please take inspiration from this readme.txt

motopress-appointment-lite/motopress-appointment.php 85% from 13 tests

The principal PHP file in "WordPress Appointment Booking Plugin" v. 1.21.1 is loaded by WordPress automatically on each request
Please make the necessary changes and fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("motopress-appointment-lite.php" instead of "motopress-appointment.php")
  • Text Domain: If you choose to specify the text domain, it must be the same as the plugin slug; optional since WordPress version 4.6

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 detected792,237 lines of code in 2,116 files:
LanguageFilesBlank linesComment linesLines of code
PHP1,91514,42633,327628,881
JavaScript9814,16938,353124,852
PO File57,18515,36014,856
CSS3546523212,256
JSON541010,172
Markdown82950720
Sass1410500

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.30
Average class complexity8.06
▷ Minimum class complexity1.00
▷ Maximum class complexity372.00
Average method complexity2.08
▷ Minimum method complexity1.00
▷ Maximum method complexity32.00
Code structure
Namespaces90
Interfaces8
Traits10
Classes483
▷ Abstract classes6914.29%
▷ Concrete classes41485.71%
▷ Final classes71.69%
Methods3,288
▷ Static methods36811.19%
▷ Public methods2,22967.79%
▷ Protected methods94628.77%
▷ Private methods1133.44%
Functions353
▷ Named functions23165.44%
▷ Anonymous functions12234.56%
Constants358
▷ Global constants154.19%
▷ Class constants34395.81%
▷ Public constants343100.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
2 PNG files occupy 0.23MB with 0.15MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/js/intl-tel-input-17.0.19/img/flags.png69.20KB23.42KB▼ 66.16%
assets/js/intl-tel-input-17.0.19/img/flags@2x.png170.28KB68.04KB▼ 60.04%