10% appointment-form-manager

Code Review | Appointment Form Manager

WordPress plugin Appointment Form Manager scored 10% from 54 tests.

About plugin

  • Plugin page: appointment-form-...
  • Plugin version: 2.1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.2-5.8.1
  • WordPress version: 6.3.1
  • First release: Jul 11, 2015
  • Latest release: Sep 11, 2021
  • Number of updates: 16
  • Update frequency: every 140.9 days
  • Top authors: anil.oxzin (100%)

Code review

54 tests

User reviews

1 review

Install metrics

30+ active / 3,455 total downloads

Benchmarks

Plugin footprint 23% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The following installer errors require your attention
  • Install procedure had errors
    • > Notice in wp-content/plugins/appointment-form-manager/includes/class-appointment-form-manager-loader.php+142
    Undefined property: Appointment_Form_Manager_Loader::$shortcodes

Server metrics [RAM: ▼1.94MB] [CPU: ▼58.27ms] Passed 4 tests

An overview of server-side resources used by Appointment Form Manager
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /2.05 ▼1.418.62 ▼37.06
Dashboard /wp-admin2.07 ▼1.236.24 ▼55.58
Posts /wp-admin/edit.php2.07 ▼1.296.03 ▼45.07
Add New Post /wp-admin/post-new.php2.07 ▼3.825.39 ▼95.35
Media Library /wp-admin/upload.php2.07 ▼1.165.10 ▼31.00
AFM Custom CSS /wp-admin/admin.php?page=afm-custom-css-page2.075.91
Form /wp-admin/admin.php?page=afm-add-form-page2.077.50
Manage Mail List /wp-admin/admin.php?page=afm-manage-list-page2.075.06
AFM Settings /wp-admin/admin.php?page=afm-plugin-settings-page2.076.58
Edit Mail List /wp-admin/admin.php?page=afm-edit-mail-list2.075.93

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

How much does this plugin use your filesystem and database?
This plugin was installed successfully
Filesystem: 66 new files
Database: 1 new table, 27 new options
New tables
wp_afm_list
New WordPress options
afm_valid_email_err_msg
afm_admin_send_success_msg
afm_admin_send_err_msg
can_compress_scripts
afm_null_fname_err_msg
afm_null_phone_err_msg
afm_null_visit_err_msg
afm_invalid_captcha_err_msg
theysaidso_admin_options
db_upgraded
...

Browser metrics Passed 4 tests

Checking browser requirements for Appointment Form Manager
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,948 ▲20214.00 ▼0.598.56 ▲6.6944.48 ▲0.61
Dashboard /wp-admin2,241 ▲504.86 ▼1.04114.32 ▼8.0241.50 ▼22.14
Posts /wp-admin/edit.php2,124 ▲322.04 ▲0.0639.72 ▼3.4832.72 ▼5.13
Add New Post /wp-admin/post-new.php1,543 ▲1022.69 ▼0.42694.29 ▼1.1070.09 ▲18.73
Media Library /wp-admin/upload.php1,489 ▲1044.23 ▼0.12115.09 ▼10.0556.27 ▲5.08
AFM Custom CSS /wp-admin/admin.php?page=afm-custom-css-page8122.0424.1229.61
Form /wp-admin/admin.php?page=afm-add-form-page9222.6255.9039.85
Manage Mail List /wp-admin/admin.php?page=afm-manage-list-page8352.0330.5833.39
AFM Settings /wp-admin/admin.php?page=afm-plugin-settings-page9402.0527.9237.64
Edit Mail List /wp-admin/admin.php?page=afm-edit-mail-list8102.0535.0535.14

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
Please fix the following items
  • This plugin cannot be uninstalled
    • > Notice in wp-content/plugins/appointment-form-manager/includes/class-appointment-form-manager-loader.php+142
    Undefined property: Appointment_Form_Manager_Loader::$shortcodes
  • The plugin did not uninstall successfully, leaving 1 table in the database
    • wp_afm_list
  • This plugin does not fully uninstall, leaving 27 options in the database
    • widget_recent-comments
    • can_compress_scripts
    • afm_admin_send_err_msg
    • afm_null_email_err_msg
    • afm_admin_send_name_msg
    • afm_valid_email_err_msg
    • afm_admin_send_email_msg
    • afm_admin_mail_from_email
    • afm_null_comment_err_msg
    • afm_admin_mail_to_option
    • ...

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
These errors were triggered by the plugin
  • 5 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=afm-edit-mail-list
    • > Notice in wp-content/plugins/appointment-form-manager/includes/class-appointment-form-manager-loader.php+142
    Undefined property: Appointment_Form_Manager_Loader::$shortcodes
    • > GET request to /wp-admin/admin.php?page=afm-custom-css-page
    • > Notice in wp-content/plugins/appointment-form-manager/admin/partials/appointment-form-manager-admin-css-editor.php+51
    Trying to access array offset on value of type bool
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=afm-add-form-page
    • > Warning in wp-content/plugins/appointment-form-manager/admin/partials/appointment-form-manager-admin-add-form.php+39
    count(): Parameter must be an array or an object that implements Countable
    • > GET request to /wp-admin/admin.php?page=afm-manage-list-page
    • > User notice in wp-includes/functions.php+5905
    Function wpdb::prepare was called incorrectly. The query argument of wpdb::prepare() must have a placeholder. Please see Debugging in WordPress for more information. (This message was added in version 3.9.0.)
    • > GET request to /wp-admin/admin.php?page=afm-manage-list-page
    • > User notice in wp-includes/functions.php+5905
    Function wpdb::prepare was called incorrectly. The query does not contain the correct number of placeholders (0) for the number of arguments passed (1). Please see Debugging in WordPress for more information. (This message was added in version 4.8.3.)
    • > GET request to /wp-admin/admin.php?page=afm-edit-mail-list
    • > User deprecated in wp-includes/functions.php+5737
    Function get_bloginfo was called with an argument that is deprecated since version 2.2.0! The siteurl option is deprecated for the family of bloginfo() functions. Use the url option instead.

SRP 0% 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
The following issues need your attention
  • 1× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/appointment-form-manager/admin/loaders/render.php
  • 8× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Exception: Error Processing Request in wp-content/plugins/appointment-form-manager/admin/loaders/save.php:12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_bloginfo() in wp-content/plugins/appointment-form-manager/admin/partials/appointment-form-manager-admin-edit-mail-list.php:18
    • > PHP Fatal error
      Uncaught Error: Call to undefined function current_user_can() in wp-content/plugins/appointment-form-manager/admin/partials/appointment-form-manager-admin-css-editor.php:17
    • > PHP Fatal error
      Uncaught Error: Call to undefined function current_user_can() in wp-content/plugins/appointment-form-manager/admin/partials/appointment-form-manager-admin-add-form.php:17
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/appointment-form-manager/admin/partials/appointment-form-manager-admin-mail-list.php:23
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/appointment-form-manager/public/partials/appointment-form-manager-public-display.php:17
    • > PHP Fatal error
      Uncaught Exception: Error Processing Request in wp-content/plugins/appointment-form-manager/admin/loaders/formLoader.php:45
    • > PHP Fatal error
      Uncaught Error: Call to undefined function current_user_can() in wp-content/plugins/appointment-form-manager/admin/partials/appointment-form-manager-admin-display.php:17

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 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
2 plugin tags: appointment form, contact form

appointment-form-manager/appointment-form-manager.php 92% from 13 tests

The primary PHP file in "Appointment Form Manager" version 2.1.1 is used by WordPress to initiate all plugin functionality
You should first fix the following items:
  • Description: Keep the plugin description shorter than 140 characters (currently 277 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Good job! No executable or dangerous file extensions detected4,270 lines of code in 42 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript153713842,350
PHP203517671,434
CSS61018485
JSON1001

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.28
Average class complexity8.12
▷ Minimum class complexity1.00
▷ Maximum class complexity24.00
Average method complexity2.12
▷ Minimum method complexity1.00
▷ Maximum method complexity22.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes8
▷ Abstract classes00.00%
▷ Concrete classes8100.00%
▷ Final classes00.00%
Methods51
▷ Static methods23.92%
▷ Public methods3670.59%
▷ Protected methods00.00%
▷ Private methods1529.41%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
No PNG files were detected