78% better-appointment

Code Review | Better Appointment

WordPress plugin Better Appointment scored 78% from 54 tests.

About plugin

  • Plugin page: better-appointment
  • Plugin version: 1.0
  • PHP compatiblity: 7.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.1-5.4
  • WordPress version: 5.9.2
  • First release: Jun 9, 2020
  • Latest release: Jun 29, 2020
  • Number of updates: 25
  • Update frequency: every 0.8 days
  • Top authors: ademayo (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 279 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
This plugin's installer ran successfully

Server metrics [RAM: ▲0.18MB] [CPU: ▼296.19ms] Passed 4 tests

Analyzing server-side resources used by Better Appointment
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.72 ▲0.2057.88 ▲5.18
Dashboard /wp-admin3.56 ▲0.1538.34 ▲4.17
Posts /wp-admin/edit.php3.79 ▲0.1541.84 ▲3.79
Add New Post /wp-admin/post-new.php7.82 ▲0.85103.06 ▼1,189.39
Media Library /wp-admin/upload.php3.51 ▲0.2127.46 ▼3.33

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

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 149 new files
Database: no new tables, 7 new options
New WordPress options
ba_email_admin
ba_form_terms
ba_email_customer
ba_installed
ba_version
ba_jwt_secret
ba_success_page_datetime

Browser metrics Passed 4 tests

Checking browser requirements for Better Appointment
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,819 ▲6515.92 ▲0.145.72 ▼0.822.26 ▼0.73
Dashboard /wp-admin2,930 ▲726.16 ▲0.01118.75 ▼13.14156.11 ▼9.33
Posts /wp-admin/edit.php2,724 ▲333.23 ▲0.0064.25 ▼2.40137.29 ▼7.44
Add New Post /wp-admin/post-new.php1,742 ▼1022.17 ▲0.57458.66 ▲2.23157.99 ▼2.08
Media Library /wp-admin/upload.php1,731 ▲335.51 ▼0.04144.69 ▲4.38188.51 ▼4.04
Appointments /wp-admin/admin.php?page=better-appointment#/1,1474.3496.09126.59
Settings /wp-admin/admin.php?page=better-appointment#/settings1,7505.19121.08191.60

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
  • Zombie WordPress options were found after uninstall: 7 options
    • ba_version
    • ba_email_admin
    • ba_form_terms
    • ba_jwt_secret
    • ba_email_customer
    • ba_installed
    • ba_success_page_datetime

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though everything seems fine, this is not an exhaustive test

SRP 50% 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
  • 61× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Interface 'Hackzilla\\PasswordGenerator\\RandomGenerator\\RandomGeneratorInterface' not found in wp-content/plugins/better-appointment/vendor/hackzilla/password-generator/RandomGenerator/Php5RandomGenerator.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'Rakit\\Validation\\Rule' not found in wp-content/plugins/better-appointment/vendor/rakit/validation/src/Rules/NotIn.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'Rakit\\Validation\\Rule' not found in wp-content/plugins/better-appointment/vendor/rakit/validation/src/Rules/Json.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'Rakit\\Validation\\Rule' not found in wp-content/plugins/better-appointment/vendor/rakit/validation/src/Rules/Before.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'Rakit\\Validation\\Rule' not found in wp-content/plugins/better-appointment/vendor/rakit/validation/src/Rules/Alpha.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'Rakit\\Validation\\Rule' not found in wp-content/plugins/better-appointment/vendor/rakit/validation/src/Rules/Url.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'Rakit\\Validation\\Rule' not found in wp-content/plugins/better-appointment/vendor/rakit/validation/src/Rules/After.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'Hackzilla\\PasswordGenerator\\Generator\\AbstractPasswordGenerator' not found in wp-content/plugins/better-appointment/vendor/hackzilla/password-generator/Generator/HumanPasswordGenerator.php:11
    • > PHP Fatal error
      Uncaught Error: Class 'Rakit\\Validation\\Rules\\Required' not found in wp-content/plugins/better-appointment/vendor/rakit/validation/src/Rules/RequiredWithoutAll.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'Rakit\\Validation\\Rules\\Required' not found in wp-content/plugins/better-appointment/vendor/rakit/validation/src/Rules/RequiredWithAll.php:7

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There are user-side issues you should fix
    • > GET request to /wp-admin/admin.php?page=better-appointment#/
    • > Network (severe)
    wp-json/better-appointment/v1/get-appointments - Failed to load resource: the server responded with a status of 404 (Not Found)
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=better-appointment#/settings
    • > Javascript (severe) in unknown
    /wp-content/plugins/better-appointment/assets/js/admin.js?ver=1592590486 1:505298
    • > GET request to /wp-admin/admin.php?page=better-appointment#/settings
    • > Network (severe)
    wp-json/better-appointment/v1/get-settings - Failed to load resource: the server responded with a status of 404 (Not Found)

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
No plugin tags provided

better-appointment/plugin.php 85% from 13 tests

The principal PHP file in "Better Appointment" v. 1.0 is loaded by WordPress automatically on each request
Please make the necessary changes and fix the following:
  • Domain Path: The domain path folder was not found ("/languages")
  • Main file name: Name the main plugin file the same as the plugin slug ("better-appointment.php" instead of "plugin.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Success! There were no dangerous files found in this plugin6,969 lines of code in 141 files:
LanguageFilesBlank linesComment linesLines of code
PHP1301,5343,6126,636
JSON500319
YAML1206
Markdown1304
CSS20102
JavaScript2022

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.35
Average class complexity5.98
▷ Minimum class complexity1.00
▷ Maximum class complexity59.00
Average method complexity2.34
▷ Minimum method complexity1.00
▷ Maximum method complexity22.00
Code structure
Namespaces19
Interfaces6
Traits5
Classes114
▷ Abstract classes32.63%
▷ Concrete classes11197.37%
▷ Final classes10.90%
Methods485
▷ Static methods347.01%
▷ Public methods42487.42%
▷ Protected methods479.69%
▷ Private methods142.89%
Functions8
▷ Named functions112.50%
▷ Anonymous functions787.50%
Constants41
▷ Global constants00.00%
▷ Class constants41100.00%
▷ Public constants41100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
There are no PNG files in this plugin