Inheriting code you did not write.
BEFORE COMMITTING
Look at it first. Quote after you have seen the code, not before.
A site built on a nulled theme, or with core files edited, may be cheaper to rebuild than to maintain.
WHAT TO ASSESS
Is it version controlled, or only on the server What is the PHP version and is it supported How out of date are core, plugins and dependencies Are there modifications to core or plugin files Is there any documentation Are there backups Any obvious security problems
FIRST ACTIONS
Take a full backup before touching anything Put the code in version control if it is not already Set up a staging copy and work there first Apply updates on staging and see what breaks
TELLING THE CLIENT
Be honest about what you find. If the site is in poor condition, say so with specifics, and give them the option of remediation or rebuild.
Taking on a badly built site at a low price makes its problems yours.