Function derivatives

Manipulate[

poly[x_]:=-(x-1)(x-3)(x-6)(x-9)/22+3;
(*trig[x_]:=Sin[x]+Cos[2x];
ln[x_]:=3 Log[x]/2;*)

Dynamic[Refresh[Module[{xmin,xmax,plotoptions(*,curve*)},

xmin=0; xmax=10;
xf1=3;xf2=13/2;
plotoptions={PlotRange->{{-1.5,9.5},{-4,7}}, PlotRangePadding->0.1,AspectRatio->1,ImageSize->300};
r=0.01;
nofunc[x0_]:=Show[Plot[0,{x,xmin,xmax},Evaluate[plotoptions]]];curve[x0_]:=Show[Plot[fcn[x],{x,xmin,xmax},Evaluate[plotoptions],PlotStyle->{Thickness[0.003],Black}],Graphics[{PointSize[r],Point[{x0,fcn[x0]}],Line[{{x0,fcn[x0]},{x0,0}}],Inset[Framed[Style[Row[{Style["m", Italic]," = ",NumberForm[N[fcn'[pt[[1]]]],{4,2}]}],14(*,Background->LightRed*)],FrameMargins->1],{x0+0.8,fcn[x0]}]}]];
tline[x0_]:=Plot[fcn'[x0](x-x0)+fcn[x0],{x,xmin,xmax},PlotStyle->Purple];
deriv1[x0_]:=Show[Plot[fcn'[x],{x,xmin,xmax},Evaluate[plotoptions],PlotStyle->Brown],Graphics[{Red,Dashed,Arrowheads[.02], PointSize[r],Point[{x0,fcn'[x0]}],Arrow[{{x0,fcn[x0]},{x0,fcn'[x0]}}],Arrow[{{x0,fcn'[x0]},{0,fcn'[x0]}}],Inset[Framed[Style[Row[{Style["y'", Italic]," = ",NumberForm[N[fcn'[pt[[1]]]],{4,2}]}],14,Brown(*,Background->LightRed*)],FrameMargins->1],{0-0.7,fcn'[x0]}]}]];
deriv2[x0_]:=Show[Plot[fcn''[x],{x,xmin,xmax},Evaluate[plotoptions],PlotStyle->Green],Graphics[{Green,PointSize[r],Point[{x0,fcn''[x0]}],Line[{{xf1,-10},{xf1,10}}],Line[{{xf2,-10},{xf2,10}}],Inset[Style[Column[{Style["Concavity:",12],Style["⇓", Bold]},Center],22,Green],{(xf1/2),6.7}],Inset[Style[Column[{Style["Concavity:",12],Style["⇑", Bold]},Center],22,Green],{((xf2+xf1)/2),6.7}],Inset[Style[Column[{Style["Concavity: ",12],Style["⇓", Bold]},Center],22,Green],{((10+xf2)/2),6.7}]}]];

Show[nofunc[pt[[1]]],Through[showderivs[pt[[1]]]],ImageSize->650]

],TrackedSymbols:>{pt,showderivs,fcn}]],

{{fcn,poly,""},{poly->"polynomial",trig->"trigonometric",ln->"logarithmic"},ControlType->None(*RadioButtonBar*),ControlPlacement->Top},
Delimiter,"",
{{pt,{2.3,0}},{.01,0},{10,0},Locator,Appearance->Style["⇐♁⇒",22,Bold,Blue(*GrayLevel[0.4]*)]},
{{showderivs,{curve,tline,deriv1},""},{(*nofunc->" nofunc  ",*)curve->" function  ",tline->" tangent line  ",deriv1->" first derivative  ",deriv2->" second derivative"},ControlType->CheckboxBar,ControlPlacement->Top},
FrameLabel->Column[{Style[Row[{"move the ",Style["⇐♁⇒",Blue,Bold]," blue marker along the ",Style["x",Italic]," axis"}],16]},Alignment->Center],TrackedSymbols:>{pt,showderivs,fcn},AutorunSequencing->{1,2}]